Files
react/packages/react-devtools-inline/__tests__/__e2e__/utils.js
T
Ricky d172bdaf95 Add jest lint rules (#29760)
## Overview

Updates `eslint-plugin-jest` and enables the recommended rules with some
turned off that are unhelpful.

The main motivations is:
a) we have a few duplicated tests, which this found an I deleted 
b) making sure we don't accidentally commit skipped tests
2024-06-10 14:31:37 -04:00

19 lines
503 B
JavaScript

'use strict';
/** @flow */
const semver = require('semver');
const config = require('../../playwright.config');
const {test} = require('@playwright/test');
function runOnlyForReactRange(range) {
// eslint-disable-next-line jest/no-disabled-tests
test.skip(
!semver.satisfies(config.use.react_version, range),
`This test requires a React version of ${range} to run. ` +
`The React version you're using is ${config.use.react_version}`
);
}
module.exports = {runOnlyForReactRange};