Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Fix the expected error message for Dockerfile syntax errors #36

Merged
merged 3 commits into from
Nov 9, 2023
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
3 changes: 3 additions & 0 deletions .mocharc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
timeout: 25000,
spec: 'test/**/*.spec.ts',
// TODO: This shouldn't be necessary, but the tests on node20 hang, while they pass on node 16 & 18.
// `leaked-handles` showed an unclosed docker deamon connection.
klutchell marked this conversation as resolved.
Show resolved Hide resolved
exit: true,
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"proxyquire": "^2.1.3",
"rimraf": "^5.0.1",
"ts-mocha": "^10.0.0",
"typescript": "^5.1.6"
"typescript": "~5.1.6"
klutchell marked this conversation as resolved.
Show resolved Hide resolved
},
"dependencies": {
"ajv": "^6.12.3",
Expand Down
6 changes: 3 additions & 3 deletions test/multibuild/build.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ describe('Specifying a dockerfile', () => {
.to.have.property('error')
.that.has.property('message')
.that.matches(
/Dockerfile parse error line 1: unknown instruction: CORRECT/i,
/Dockerfile parse error (on )?line 1: unknown instruction: CORRECT/i,
);
});
});
Expand Down Expand Up @@ -554,7 +554,7 @@ describe('Specifying a dockerfile', () => {
.to.have.property('error')
.that.has.property('message')
.that.matches(
/Dockerfile parse error line 1: unknown instruction: CORRECT/i,
/Dockerfile parse error (on )?line 1: unknown instruction: CORRECT/i,
);
});
});
Expand Down Expand Up @@ -601,7 +601,7 @@ describe('Specifying a dockerfile hook', () => {
.to.have.property('error')
.that.has.property('message')
.that.matches(
/Dockerfile parse error line 1: unknown instruction: CORRECT/i,
/Dockerfile parse error (on )?line 1: unknown instruction: CORRECT/i,
);
});
});
Expand Down
Loading