Skip to content

Commit a282913

Browse files
authored
Disables Prolog tests from new releases (#6918)
## What's the problem this PR addresses? The prolog constraints are deprecated and will be removed from the next majors. They should be migrated to the JS interface. ## How did you fix it? Prevent the tests from running on versions that don't support prolog constraints. ## Checklist <!--- Don't worry if you miss something, chores are automatically tested. --> <!--- This checklist exists to help you remember doing the chores when you submit a PR. --> <!--- Put an `x` in all the boxes that apply. --> - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). <!-- See https://yarnpkg.com/advanced/contributing#preparing-your-pr-to-be-released for more details. --> <!-- Check with `yarn version check` and fix with `yarn version check -i` --> - [x] I have set the packages that need to be released for my changes to be effective. <!-- The "Testing chores" workflow validates that your PR follows our guidelines. --> <!-- If it doesn't pass, click on it to see details as to what your PR might be missing. --> - [x] I will check that all automated PR checks pass before the PR gets reviewed.
1 parent f6aafa0 commit a282913

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

packages/acceptance-tests/pkg-tests-specs/sources/commands/constraints/query.test.js

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const {
22
fs: {writeFile},
3+
tests: {testIf},
34
} = require(`pkg-tests-core`);
45

56
const {environments} = require(`./environments`);
@@ -24,7 +25,8 @@ custom_predicate(DependencyType):-
2425

2526
describe(`Commands`, () => {
2627
describe(`constraints query`, () => {
27-
test(
28+
testIf(
29+
`prologConstraints`,
2830
`test without trailing .`,
2931
makeTemporaryEnv({}, async({path, run, source}) => {
3032
await environments[`one regular dependency`](path);
@@ -43,7 +45,8 @@ describe(`Commands`, () => {
4345
}),
4446
);
4547

46-
test(
48+
testIf(
49+
`prologConstraints`,
4750
`test with a syntax error`,
4851
makeTemporaryEnv({}, async({path, run, source}) => {
4952
await environments[`one regular dependency`](path);
@@ -62,7 +65,8 @@ describe(`Commands`, () => {
6265
}),
6366
);
6467

65-
test(
68+
testIf(
69+
`prologConstraints`,
6670
`test with an unknown predicate`,
6771
makeTemporaryEnv({}, async({path, run, source}) => {
6872
await environments[`one regular dependency`](path);
@@ -81,7 +85,8 @@ describe(`Commands`, () => {
8185
}),
8286
);
8387

84-
test(
88+
testIf(
89+
`prologConstraints`,
8590
`test with an empty predicate`,
8691
makeTemporaryEnv({}, async({path, run, source}) => {
8792
await environments[`one regular dependency`](path);
@@ -102,7 +107,8 @@ describe(`Commands`, () => {
102107

103108
for (const [environmentDescription, environment] of Object.entries(environments)) {
104109
for (const [queryDescription, query] of Object.entries(queries)) {
105-
test(
110+
testIf(
111+
`prologConstraints`,
106112
`test (${environmentDescription} / ${queryDescription})`,
107113
makeTemporaryEnv({}, async ({path, run, source}) => {
108114
await environment(path);

packages/acceptance-tests/pkg-tests-specs/sources/commands/constraints/source.test.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
const {
22
fs: {writeFile},
3+
tests: {testIf},
34
} = require(`pkg-tests-core`);
45

56
const {environments} = require(`./environments`);
@@ -15,7 +16,8 @@ describe(`Commands`, () => {
1516
describe(`constraints source`, () => {
1617
for (const [environmentDescription, environment] of Object.entries(environments)) {
1718
for (const [scriptDescription, script] of Object.entries(constraints)) {
18-
test(
19+
testIf(
20+
`prologConstraints`,
1921
`test (${environmentDescription} / ${scriptDescription})`,
2022
makeTemporaryEnv({}, async ({path, run, source}) => {
2123
await environment(path);

0 commit comments

Comments
 (0)