diff --git a/cloud-sql/mysql/mysql/package.json b/cloud-sql/mysql/mysql/package.json index a80e646a56..309ee10d11 100644 --- a/cloud-sql/mysql/mysql/package.json +++ b/cloud-sql/mysql/mysql/package.json @@ -13,7 +13,7 @@ "node": ">=8" }, "scripts": { - "system-test": "ava --verbose test/*.test.js", + "system-test": "mocha test/*.test.js --timeout=60000 --exit", "all-test": "npm run system-test" }, "dependencies": { @@ -27,7 +27,7 @@ }, "devDependencies": { "@google-cloud/nodejs-repo-tools": "^3.2.0", - "ava": "^0.25.0", + "mocha": "^6.0.0", "proxyquire": "^2.1.0", "supertest": "^4.0.0", "sinon": "^7.1.1" diff --git a/cloud-sql/mysql/mysql/test/server.test.js b/cloud-sql/mysql/mysql/test/server.test.js index c36f6bc24f..80f9c877eb 100644 --- a/cloud-sql/mysql/mysql/test/server.test.js +++ b/cloud-sql/mysql/mysql/test/server.test.js @@ -15,10 +15,10 @@ 'use strict'; -const request = require(`supertest`); -const sinon = require(`sinon`); -const test = require(`ava`); -const tools = require(`@google-cloud/nodejs-repo-tools`); +const request = require('supertest'); +const sinon = require('sinon'); +const assert = require('assert'); +const tools = require('@google-cloud/nodejs-repo-tools'); // Stub out MySQL calls const stubMysql = sinon.stub(require('promise-mysql')); @@ -31,15 +31,15 @@ stubMysql.createPool.returns(poolStub); const server = require('../server.js'); -test.beforeEach(tools.stubConsole); -test.afterEach.always(tools.restoreConsole); +beforeEach(tools.stubConsole); +afterEach(tools.restoreConsole); -test(`check index page`, async t => { +it('check index page', async () => { const response = await request(server) .get('/') .timeout(1000); - t.is(response.status, 200); + assert.strictEqual(response.status, 200); }); server.close();