Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const {
fs: {writeFile},
tests: {testIf},
} = require(`pkg-tests-core`);

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

describe(`Commands`, () => {
describe(`constraints query`, () => {
test(
testIf(
`prologConstraints`,
`test without trailing .`,
makeTemporaryEnv({}, async({path, run, source}) => {
await environments[`one regular dependency`](path);
Expand All @@ -43,7 +45,8 @@ describe(`Commands`, () => {
}),
);

test(
testIf(
`prologConstraints`,
`test with a syntax error`,
makeTemporaryEnv({}, async({path, run, source}) => {
await environments[`one regular dependency`](path);
Expand All @@ -62,7 +65,8 @@ describe(`Commands`, () => {
}),
);

test(
testIf(
`prologConstraints`,
`test with an unknown predicate`,
makeTemporaryEnv({}, async({path, run, source}) => {
await environments[`one regular dependency`](path);
Expand All @@ -81,7 +85,8 @@ describe(`Commands`, () => {
}),
);

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

for (const [environmentDescription, environment] of Object.entries(environments)) {
for (const [queryDescription, query] of Object.entries(queries)) {
test(
testIf(
`prologConstraints`,
`test (${environmentDescription} / ${queryDescription})`,
makeTemporaryEnv({}, async ({path, run, source}) => {
await environment(path);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const {
fs: {writeFile},
tests: {testIf},
} = require(`pkg-tests-core`);

const {environments} = require(`./environments`);
Expand All @@ -15,7 +16,8 @@ describe(`Commands`, () => {
describe(`constraints source`, () => {
for (const [environmentDescription, environment] of Object.entries(environments)) {
for (const [scriptDescription, script] of Object.entries(constraints)) {
test(
testIf(
`prologConstraints`,
`test (${environmentDescription} / ${scriptDescription})`,
makeTemporaryEnv({}, async ({path, run, source}) => {
await environment(path);
Expand Down
Loading