Skip to content

Commit

Permalink
refactor(samples): convert sample tests from ava to mocha (#56)
Browse files Browse the repository at this point in the history
  • Loading branch information
nareshqlogic authored and JustinBeckwith committed Nov 21, 2018
1 parent 92f9ac1 commit 1235f95
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions asset/snippets/system-test/quickstart.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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');
Expand Down

0 comments on commit 1235f95

Please sign in to comment.