Skip to content

Commit c9f5f27

Browse files
nareshqlogicJustinBeckwith
authored andcommitted
refactor(samples): convert sample tests from ava to mocha (#56)
1 parent 4fb09e7 commit c9f5f27

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

asset/snippets/system-test/quickstart.test.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
const assert = require('assert');
1919
const path = require('path');
20-
const test = require('mocha');
2120
const tools = require('@google-cloud/nodejs-repo-tools');
2221
const util = require('util');
2322
const uuid = require('uuid');
@@ -30,17 +29,15 @@ const storage = new Storage();
3029
const bucketName = `asset-nodejs-${uuid.v4()}`;
3130
const bucket = storage.bucket(bucketName);
3231

33-
test.describe('quickstart sample tests', () => {
34-
test.before(tools.checkCredentials);
35-
test.before(async () => {
32+
describe('Quickstart sample tests', () => {
33+
before(async () => {
34+
tools.checkCredentials();
3635
await bucket.create();
3736
});
3837

39-
test.after(async () => {
40-
await bucket.delete();
41-
});
38+
after(async () => await bucket.delete());
4239

43-
test.it('should export assets to specified path', async () => {
40+
it('should export assets to specified path', async () => {
4441
const dumpFilePath = util.format('gs://%s/my-assets.txt', bucketName);
4542
await tools.runAsyncWithIO(`${cmd} export-assets ${dumpFilePath}`, cwd);
4643
const file = await bucket.file('my-assets.txt');

0 commit comments

Comments
 (0)