Skip to content

Commit

Permalink
Removed .should(..) syntax from test cases (#3713)
Browse files Browse the repository at this point in the history
  • Loading branch information
briandamaged committed Mar 9, 2020
1 parent 9d07bc9 commit 0f523db
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 0 additions & 1 deletion test/chai-setup.js
@@ -1,5 +1,4 @@
const chai = require('chai');

chai.should();
chai.use(require('chai-as-promised'));
chai.use(require('sinon-chai'));
2 changes: 1 addition & 1 deletion test/integration/builder/transaction.js
Expand Up @@ -590,7 +590,7 @@ module.exports = function(knex) {
expect(false).to.be.ok;
})
.catch(function(err) {
expect(err).should.exist;
expect(err).to.exist;
expect(err.originalError).to.equal(originalError);
// confirm transaction rolled back
return querySampleRow().then(function(resp) {
Expand Down
14 changes: 8 additions & 6 deletions test/unit/dialects/sqlite3.js
@@ -1,5 +1,7 @@
'use strict';

const { expect } = require('chai');

const sinon = require('sinon');
const DDL = require('../../../lib/dialects/sqlite3/schema/ddl');

Expand All @@ -14,7 +16,7 @@ it('[backwards compatible] can rename column with double quotes', function() {
'CREATE TABLE "accounts" ("id" varchar(24) not null primary key, "about" varchar(24))';

const newSql = ddl._doReplace(sql, '`about`', '`about_me`');
newSql.should.eql(
expect(newSql).to.eql(
'CREATE TABLE "accounts" ("id" varchar(24) not null primary key, `about_me` varchar(24))'
);
});
Expand All @@ -30,7 +32,7 @@ it('[backwards compatible] can rename column with double quotes', function() {
'CREATE TABLE "accounts" ("id" varchar(24) not null primary key, "about" varchar(24))';

const newSql = ddl._doReplace(sql, '"about"', '"about_me"');
newSql.should.eql(
expect(newSql).to.eql(
'CREATE TABLE "accounts" ("id" varchar(24) not null primary key, "about_me" varchar(24))'
);
});
Expand All @@ -46,7 +48,7 @@ it('[backwards compatible] can rename column with double quotes', function() {
'CREATE TABLE "accounts" ("id" varchar(24) not null primary key, "about" varchar(24))';

const newSql = ddl._doReplace(sql, '"about"', '`about_me`');
newSql.should.eql(
expect(newSql).to.eql(
'CREATE TABLE "accounts" ("id" varchar(24) not null primary key, `about_me` varchar(24))'
);
});
Expand All @@ -62,7 +64,7 @@ it('can rename column with back sticks', function() {
'CREATE TABLE `accounts` (`id` varchar(24) not null primary key, `about` varchar(24))';

const newSql = ddl._doReplace(sql, '`about`', '`about_me`');
newSql.should.eql(
expect(newSql).to.eql(
'CREATE TABLE `accounts` (`id` varchar(24) not null primary key, `about_me` varchar(24))'
);
});
Expand All @@ -78,7 +80,7 @@ it('can rename column with multiline and tabulated sql statement', function() {
'CREATE TABLE `accounts` (\n\n`id`\tvarchar(24) not null primary key,\r\n`about`\t \t\t \tvarchar(24)\n\n)';

const newSql = ddl._doReplace(sql, '`about`', '`about_me`');
newSql.should.eql(
expect(newSql).to.eql(
'CREATE TABLE `accounts` (`id` varchar(24) not null primary key, `about_me` varchar(24))'
);
});
Expand All @@ -94,7 +96,7 @@ it('can drop column with multiline and tabulated sql statement', function() {
'CREATE TABLE `accounts` (\n\n`id`\tvarchar(24) not null primary key,\r\n`about`\t \tvarchar(24)\n)';

const newSql = ddl._doReplace(sql, '`about`', '');
newSql.should.eql(
expect(newSql).to.eql(
'CREATE TABLE `accounts` (`id` varchar(24) not null primary key)'
);
});

0 comments on commit 0f523db

Please sign in to comment.