|
15 | 15 |
|
16 | 16 | 'use strict';
|
17 | 17 |
|
18 |
| -const path = require(`path`); |
19 |
| -const test = require(`ava`); |
20 |
| -const tools = require(`@google-cloud/nodejs-repo-tools`); |
| 18 | +const path = require('path'); |
| 19 | +const assert = require('assert'); |
| 20 | +const tools = require('@google-cloud/nodejs-repo-tools'); |
21 | 21 |
|
22 |
| -const {runAsync} = require(`@google-cloud/nodejs-repo-tools`); |
| 22 | +const {runAsync} = require('@google-cloud/nodejs-repo-tools'); |
23 | 23 |
|
24 | 24 | const PROJECT_ID = process.env.GCLOUD_PROJECT;
|
25 | 25 | const QUEUE = process.env.QUEUE_ID || 'my-appengine-queue';
|
26 |
| -const cmd = `node createTask.js`; |
27 |
| -const cwd = path.join(__dirname, `..`); |
| 26 | +const cmd = 'node createTask.js'; |
| 27 | +const cwd = path.join(__dirname, '..'); |
28 | 28 |
|
29 |
| -test.before(t => { |
| 29 | +before(() => { |
30 | 30 | if (!QUEUE) {
|
31 |
| - t.fail(`You must set the QUEUE_ID environment variable!`); |
| 31 | + assert.fail('You must set the QUEUE_ID environment variable!'); |
32 | 32 | }
|
| 33 | + tools.checkCredentials(); |
33 | 34 | });
|
34 |
| -test.before(tools.checkCredentials); |
35 | 35 |
|
36 |
| -test.serial(`should create a task`, async t => { |
| 36 | +it('should create a task', async () => { |
37 | 37 | const output = await runAsync(
|
38 | 38 | `${cmd} --project=${PROJECT_ID} --location=us-central1 --queue=${QUEUE}`,
|
39 | 39 | cwd
|
40 | 40 | );
|
41 |
| - t.true(output.includes('Created task')); |
| 41 | + assert.strictEqual(output.includes('Created task'), true); |
42 | 42 | });
|
0 commit comments