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

build: npm install before running sample tests and avoid symlink in tests #2378

Merged
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"docs2": "npm run docs-extract && npm run docs-md",
"presystem-test": "npm run compile",
"system-test": "mocha build/system-test",
"samples-test": "cd samples && npm link ../ && pwd && npm test",
"samples-test": "cd samples && npm install && npm link ../ && pwd && npm test",
"lint": "gts check",
"compile": "tsc -p .",
"build-tools": "tsc -p tsconfig.tools.json",
Expand Down
3 changes: 2 additions & 1 deletion samples/test/test.samples.auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ describe('Auth samples', () => {
const realPath = path.resolve('jwt.keys.json');
const exists = fs.existsSync(realPath);
if (!exists) {
fs.symlinkSync(fakePath, realPath);
const contents = fs.readFileSync(fakePath);
fs.writeFileSync(realPath, contents);
}
const data = await samples.jwt.runSample();
assert(data);
Expand Down