From 52463c6ff79c8f09f22afdbde6117ddf2bc2f8ad Mon Sep 17 00:00:00 2001 From: nareshqlogic <44403913+nareshqlogic@users.noreply.github.com> Date: Wed, 21 Nov 2018 23:10:19 +0530 Subject: [PATCH] refactor(samples): convert sample tests from ava to mocha (#56) --- asset/snippets/system-test/quickstart.test.js | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/asset/snippets/system-test/quickstart.test.js b/asset/snippets/system-test/quickstart.test.js index 248423b0999..de7fa6d803f 100644 --- a/asset/snippets/system-test/quickstart.test.js +++ b/asset/snippets/system-test/quickstart.test.js @@ -17,7 +17,6 @@ const assert = require('assert'); const path = require('path'); -const test = require('mocha'); const tools = require('@google-cloud/nodejs-repo-tools'); const util = require('util'); const uuid = require('uuid'); @@ -30,17 +29,15 @@ const storage = new Storage(); const bucketName = `asset-nodejs-${uuid.v4()}`; const bucket = storage.bucket(bucketName); -test.describe('quickstart sample tests', () => { - test.before(tools.checkCredentials); - test.before(async () => { +describe('Quickstart sample tests', () => { + before(async () => { + tools.checkCredentials(); await bucket.create(); }); - test.after(async () => { - await bucket.delete(); - }); + after(async () => await bucket.delete()); - test.it('should export assets to specified path', async () => { + it('should export assets to specified path', async () => { const dumpFilePath = util.format('gs://%s/my-assets.txt', bucketName); await tools.runAsyncWithIO(`${cmd} export-assets ${dumpFilePath}`, cwd); const file = await bucket.file('my-assets.txt');