Skip to content

Commit

Permalink
Fix samples tests (#1323)
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Sep 6, 2018
1 parent 206e1a2 commit 533db94
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -66,10 +66,11 @@
"version": "33.0.0",
"scripts": {
"pretest": "npm run compile",
"prepare": "npm run compile",
"test": "nyc mocha build/test",
"docs": "echo no docs 👻 # typedoc --out docs src && touch docs/.nojekyll",
"system-test": "echo no system tests 👻",
"samples-test": "cd samples && npm link ../ && npm install && cd ../ && mocha build/test/samples",
"samples-test": "cd samples && npm link ../ && pwd && npm test",
"lint": "gts check && semistandard 'samples/**/*.js'",
"compile": "tsc -v && tsc -p . && copyfiles src/apis/**/README.md src/apis/**/package.json build",
"build-tools": "tsc -p tsconfig.tools.json",
Expand Down
6 changes: 6 additions & 0 deletions samples/package.json
Expand Up @@ -3,9 +3,15 @@
"description": "The following samples show basic usage of various APIs.",
"repository": "google/google-api-nodejs-client",
"license": "Apache-2.0",
"scripts": {
"test": "mocha ../build/test/samples"
},
"dependencies": {
"googleapis": "33.0.0",
"opn": "^5.3.0",
"server-destroy": "^1.0.1"
},
"devDependencies": {
"mocha": "^5.2.0"
}
}
2 changes: 1 addition & 1 deletion test/samples/test.samples.drive.ts
Expand Up @@ -35,7 +35,7 @@ for (const p in samples) {
}
}

const someFile = path.resolve('test/fixtures/public.pem');
const someFile = path.join(__dirname, '../../../test/fixtures/public.pem');

describe('Drive samples', () => {
afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/samples/test.samples.youtube.ts
Expand Up @@ -30,7 +30,7 @@ for (const p in samples) {
}
}

const someFile = path.resolve('test/fixtures/public.pem');
const someFile = path.join(__dirname, '../../../test/fixtures/public.pem');

describe('YouTube samples', () => {
afterEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/test.kitchen.ts
Expand Up @@ -61,7 +61,7 @@ describe('kitchen sink', async () => {
await mvp(tarball, `${stagingPath}/googleapis.tgz`);
await ncpp('test/fixtures/kitchen', `${stagingPath}/`);
await spawnp('npm', ['install'], {cwd: `${stagingPath}/`});
}).timeout(40000);
}).timeout(80000);
});

/**
Expand Down

0 comments on commit 533db94

Please sign in to comment.