mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
d172bdaf95
## 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
19 lines
503 B
JavaScript
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};
|