不要怂,就是干,撸起袖子干!

Commit fd11d98f by Andy Edwards Committed by GitHub

test(integration/query-interface): asyncify (#12293)

1 parent e34efd47
......@@ -12,29 +12,27 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
this.queryInterface = this.sequelize.getQueryInterface();
});
afterEach(function() {
return Support.dropTestSchemas(this.sequelize);
afterEach(async function() {
await Support.dropTestSchemas(this.sequelize);
});
// FIXME: These tests should make assertions against the created table using describeTable
describe('createTable', () => {
it('should create a auto increment primary key', function() {
return this.queryInterface.createTable('TableWithPK', {
it('should create a auto increment primary key', async function() {
await this.queryInterface.createTable('TableWithPK', {
table_id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
}
}).then(() => {
return this.queryInterface.insert(null, 'TableWithPK', {}, { raw: true, returning: true, plain: true })
.then(([response]) => {
expect(response.table_id || typeof response !== 'object' && response).to.be.ok;
});
});
const [response] = await this.queryInterface.insert(null, 'TableWithPK', {}, { raw: true, returning: true, plain: true });
expect(response.table_id || typeof response !== 'object' && response).to.be.ok;
});
it('should create unique constraint with uniqueKeys', function() {
return this.queryInterface.createTable('MyTable', {
it('should create unique constraint with uniqueKeys', async function() {
await this.queryInterface.createTable('MyTable', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
......@@ -55,131 +53,123 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
fields: ['name']
}
}
}).then(() => {
return this.queryInterface.showIndex('MyTable');
}).then(indexes => {
switch (dialect) {
case 'postgres':
case 'postgres-native':
case 'sqlite':
case 'mssql':
// name + email
expect(indexes[0].unique).to.be.true;
expect(indexes[0].fields[0].attribute).to.equal('name');
expect(indexes[0].fields[1].attribute).to.equal('email');
// name
expect(indexes[1].unique).to.be.true;
expect(indexes[1].fields[0].attribute).to.equal('name');
break;
case 'mariadb':
case 'mysql':
// name + email
expect(indexes[1].unique).to.be.true;
expect(indexes[1].fields[0].attribute).to.equal('name');
expect(indexes[1].fields[1].attribute).to.equal('email');
// name
expect(indexes[2].unique).to.be.true;
expect(indexes[2].fields[0].attribute).to.equal('name');
break;
default:
throw new Error(`Not implemented fpr ${dialect}`);
}
});
const indexes = await this.queryInterface.showIndex('MyTable');
switch (dialect) {
case 'postgres':
case 'postgres-native':
case 'sqlite':
case 'mssql':
// name + email
expect(indexes[0].unique).to.be.true;
expect(indexes[0].fields[0].attribute).to.equal('name');
expect(indexes[0].fields[1].attribute).to.equal('email');
// name
expect(indexes[1].unique).to.be.true;
expect(indexes[1].fields[0].attribute).to.equal('name');
break;
case 'mariadb':
case 'mysql':
// name + email
expect(indexes[1].unique).to.be.true;
expect(indexes[1].fields[0].attribute).to.equal('name');
expect(indexes[1].fields[1].attribute).to.equal('email');
// name
expect(indexes[2].unique).to.be.true;
expect(indexes[2].fields[0].attribute).to.equal('name');
break;
default:
throw new Error(`Not implemented fpr ${dialect}`);
}
});
it('should work with schemas', function() {
return this.sequelize.createSchema('hero').then(() => {
return this.queryInterface.createTable('User', {
name: {
type: DataTypes.STRING
}
}, {
schema: 'hero'
});
it('should work with schemas', async function() {
await this.sequelize.createSchema('hero');
await this.queryInterface.createTable('User', {
name: {
type: DataTypes.STRING
}
}, {
schema: 'hero'
});
});
describe('enums', () => {
it('should work with enums (1)', function() {
return this.queryInterface.createTable('SomeTable', {
it('should work with enums (1)', async function() {
await this.queryInterface.createTable('SomeTable', {
someEnum: DataTypes.ENUM('value1', 'value2', 'value3')
}).then(() => {
return this.queryInterface.describeTable('SomeTable');
}).then(table => {
if (dialect.includes('postgres')) {
expect(table.someEnum.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
const table = await this.queryInterface.describeTable('SomeTable');
if (dialect.includes('postgres')) {
expect(table.someEnum.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
it('should work with enums (2)', function() {
return this.queryInterface.createTable('SomeTable', {
it('should work with enums (2)', async function() {
await this.queryInterface.createTable('SomeTable', {
someEnum: {
type: DataTypes.ENUM,
values: ['value1', 'value2', 'value3']
}
}).then(() => {
return this.queryInterface.describeTable('SomeTable');
}).then(table => {
if (dialect.includes('postgres')) {
expect(table.someEnum.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
const table = await this.queryInterface.describeTable('SomeTable');
if (dialect.includes('postgres')) {
expect(table.someEnum.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
it('should work with enums (3)', function() {
return this.queryInterface.createTable('SomeTable', {
it('should work with enums (3)', async function() {
await this.queryInterface.createTable('SomeTable', {
someEnum: {
type: DataTypes.ENUM,
values: ['value1', 'value2', 'value3'],
field: 'otherName'
}
}).then(() => {
return this.queryInterface.describeTable('SomeTable');
}).then(table => {
if (dialect.includes('postgres')) {
expect(table.otherName.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
const table = await this.queryInterface.describeTable('SomeTable');
if (dialect.includes('postgres')) {
expect(table.otherName.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
it('should work with enums (4)', function() {
return this.queryInterface.createSchema('archive').then(() => {
return this.queryInterface.createTable('SomeTable', {
someEnum: {
type: DataTypes.ENUM,
values: ['value1', 'value2', 'value3'],
field: 'otherName'
}
}, { schema: 'archive' });
}).then(() => {
return this.queryInterface.describeTable('SomeTable', { schema: 'archive' });
}).then(table => {
if (dialect.includes('postgres')) {
expect(table.otherName.special).to.deep.equal(['value1', 'value2', 'value3']);
it('should work with enums (4)', async function() {
await this.queryInterface.createSchema('archive');
await this.queryInterface.createTable('SomeTable', {
someEnum: {
type: DataTypes.ENUM,
values: ['value1', 'value2', 'value3'],
field: 'otherName'
}
});
}, { schema: 'archive' });
const table = await this.queryInterface.describeTable('SomeTable', { schema: 'archive' });
if (dialect.includes('postgres')) {
expect(table.otherName.special).to.deep.equal(['value1', 'value2', 'value3']);
}
});
it('should work with enums (5)', function() {
return this.queryInterface.createTable('SomeTable', {
it('should work with enums (5)', async function() {
await this.queryInterface.createTable('SomeTable', {
someEnum: {
type: DataTypes.ENUM(['COMMENT']),
comment: 'special enum col'
}
}).then(() => {
return this.queryInterface.describeTable('SomeTable');
}).then(table => {
if (dialect.includes('postgres')) {
expect(table.someEnum.special).to.deep.equal(['COMMENT']);
expect(table.someEnum.comment).to.equal('special enum col');
}
});
const table = await this.queryInterface.describeTable('SomeTable');
if (dialect.includes('postgres')) {
expect(table.someEnum.special).to.deep.equal(['COMMENT']);
expect(table.someEnum.comment).to.equal('special enum col');
}
});
});
});
......
......@@ -12,13 +12,13 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
this.queryInterface = this.sequelize.getQueryInterface();
});
afterEach(function() {
return Support.dropTestSchemas(this.sequelize);
afterEach(async function() {
await Support.dropTestSchemas(this.sequelize);
});
describe('describeTable', () => {
if (Support.sequelize.dialect.supports.schemas) {
it('reads the metadata of the table with schema', function() {
it('reads the metadata of the table with schema', async function() {
const MyTable1 = this.sequelize.define('my_table', {
username1: DataTypes.STRING
});
......@@ -27,36 +27,25 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
username2: DataTypes.STRING
}, { schema: 'test_meta' });
return this.sequelize.createSchema('test_meta')
.then(() => {
return MyTable1.sync({ force: true });
})
.then(() => {
return MyTable2.sync({ force: true });
})
.then(() => {
return this.queryInterface.describeTable('my_tables', 'test_meta');
})
.then(metadata => {
expect(metadata.username2).not.to.be.undefined;
})
.then(() => {
return this.queryInterface.describeTable('my_tables');
})
.then(metadata => {
expect(metadata.username1).not.to.be.undefined;
return this.sequelize.dropSchema('test_meta');
});
await this.sequelize.createSchema('test_meta');
await MyTable1.sync({ force: true });
await MyTable2.sync({ force: true });
const metadata0 = await this.queryInterface.describeTable('my_tables', 'test_meta');
expect(metadata0.username2).not.to.be.undefined;
const metadata = await this.queryInterface.describeTable('my_tables');
expect(metadata.username1).not.to.be.undefined;
await this.sequelize.dropSchema('test_meta');
});
}
it('rejects when no data is available', function() {
return expect(
it('rejects when no data is available', async function() {
await expect(
this.queryInterface.describeTable('_some_random_missing_table')
).to.be.rejectedWith('No description found for "_some_random_missing_table" table. Check the table name and schema; remember, they _are_ case sensitive.');
});
it('reads the metadata of the table', function() {
it('reads the metadata of the table', async function() {
const Users = this.sequelize.define('_Users', {
username: DataTypes.STRING,
city: {
......@@ -68,81 +57,79 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
enumVals: DataTypes.ENUM('hello', 'world')
}, { freezeTableName: true });
return Users.sync({ force: true }).then(() => {
return this.queryInterface.describeTable('_Users').then(metadata => {
const id = metadata.id;
const username = metadata.username;
const city = metadata.city;
const isAdmin = metadata.isAdmin;
const enumVals = metadata.enumVals;
expect(id.primaryKey).to.be.true;
if (['mysql', 'mssql'].includes(dialect)) {
expect(id.autoIncrement).to.be.true;
}
let assertVal = 'VARCHAR(255)';
switch (dialect) {
case 'postgres':
assertVal = 'CHARACTER VARYING(255)';
break;
case 'mssql':
assertVal = 'NVARCHAR(255)';
break;
}
expect(username.type).to.equal(assertVal);
expect(username.allowNull).to.be.true;
switch (dialect) {
case 'sqlite':
expect(username.defaultValue).to.be.undefined;
break;
default:
expect(username.defaultValue).to.be.null;
}
switch (dialect) {
case 'sqlite':
expect(city.defaultValue).to.be.null;
break;
}
assertVal = 'TINYINT(1)';
switch (dialect) {
case 'postgres':
assertVal = 'BOOLEAN';
break;
case 'mssql':
assertVal = 'BIT';
break;
}
expect(isAdmin.type).to.equal(assertVal);
expect(isAdmin.allowNull).to.be.true;
switch (dialect) {
case 'sqlite':
expect(isAdmin.defaultValue).to.be.undefined;
break;
default:
expect(isAdmin.defaultValue).to.be.null;
}
if (dialect.match(/^postgres/)) {
expect(enumVals.special).to.be.instanceof(Array);
expect(enumVals.special).to.have.length(2);
} else if (dialect === 'mysql') {
expect(enumVals.type).to.eql('ENUM(\'hello\',\'world\')');
}
if (dialect === 'postgres' || dialect === 'mysql' || dialect === 'mssql') {
expect(city.comment).to.equal('Users City');
expect(username.comment).to.equal(null);
}
});
});
await Users.sync({ force: true });
const metadata = await this.queryInterface.describeTable('_Users');
const id = metadata.id;
const username = metadata.username;
const city = metadata.city;
const isAdmin = metadata.isAdmin;
const enumVals = metadata.enumVals;
expect(id.primaryKey).to.be.true;
if (['mysql', 'mssql'].includes(dialect)) {
expect(id.autoIncrement).to.be.true;
}
let assertVal = 'VARCHAR(255)';
switch (dialect) {
case 'postgres':
assertVal = 'CHARACTER VARYING(255)';
break;
case 'mssql':
assertVal = 'NVARCHAR(255)';
break;
}
expect(username.type).to.equal(assertVal);
expect(username.allowNull).to.be.true;
switch (dialect) {
case 'sqlite':
expect(username.defaultValue).to.be.undefined;
break;
default:
expect(username.defaultValue).to.be.null;
}
switch (dialect) {
case 'sqlite':
expect(city.defaultValue).to.be.null;
break;
}
assertVal = 'TINYINT(1)';
switch (dialect) {
case 'postgres':
assertVal = 'BOOLEAN';
break;
case 'mssql':
assertVal = 'BIT';
break;
}
expect(isAdmin.type).to.equal(assertVal);
expect(isAdmin.allowNull).to.be.true;
switch (dialect) {
case 'sqlite':
expect(isAdmin.defaultValue).to.be.undefined;
break;
default:
expect(isAdmin.defaultValue).to.be.null;
}
if (dialect.match(/^postgres/)) {
expect(enumVals.special).to.be.instanceof(Array);
expect(enumVals.special).to.have.length(2);
} else if (dialect === 'mysql') {
expect(enumVals.type).to.eql('ENUM(\'hello\',\'world\')');
}
if (dialect === 'postgres' || dialect === 'mysql' || dialect === 'mssql') {
expect(city.comment).to.equal('Users City');
expect(username.comment).to.equal(null);
}
});
it('should correctly determine the primary key columns', function() {
it('should correctly determine the primary key columns', async function() {
const Country = this.sequelize.define('_Country', {
code: { type: DataTypes.STRING, primaryKey: true },
name: { type: DataTypes.STRING, allowNull: false }
......@@ -160,26 +147,20 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
}
}, { freezeTableName: true });
return Country.sync({ force: true }).then(() => {
return this.queryInterface.describeTable('_Country').then(
metacountry => {
expect(metacountry.code.primaryKey).to.eql(true);
expect(metacountry.name.primaryKey).to.eql(false);
return Alumni.sync({ force: true }).then(() => {
return this.queryInterface.describeTable('_Alumni').then(
metalumni => {
expect(metalumni.year.primaryKey).to.eql(true);
expect(metalumni.num.primaryKey).to.eql(true);
expect(metalumni.username.primaryKey).to.eql(false);
expect(metalumni.dob.primaryKey).to.eql(false);
expect(metalumni.dod.primaryKey).to.eql(false);
expect(metalumni.ctrycod.primaryKey).to.eql(false);
expect(metalumni.city.primaryKey).to.eql(false);
});
});
});
});
await Country.sync({ force: true });
const metacountry = await this.queryInterface.describeTable('_Country');
expect(metacountry.code.primaryKey).to.eql(true);
expect(metacountry.name.primaryKey).to.eql(false);
await Alumni.sync({ force: true });
const metalumni = await this.queryInterface.describeTable('_Alumni');
expect(metalumni.year.primaryKey).to.eql(true);
expect(metalumni.num.primaryKey).to.eql(true);
expect(metalumni.username.primaryKey).to.eql(false);
expect(metalumni.dob.primaryKey).to.eql(false);
expect(metalumni.dod.primaryKey).to.eql(false);
expect(metalumni.ctrycod.primaryKey).to.eql(false);
expect(metalumni.city.primaryKey).to.eql(false);
});
});
});
......@@ -12,13 +12,13 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
this.queryInterface = this.sequelize.getQueryInterface();
});
afterEach(function() {
return Support.dropTestSchemas(this.sequelize);
afterEach(async function() {
await Support.dropTestSchemas(this.sequelize);
});
describe('dropEnum', () => {
beforeEach(function() {
return this.queryInterface.createTable('menus', {
beforeEach(async function() {
await this.queryInterface.createTable('menus', {
structuretype: {
type: DataTypes.ENUM('menus', 'submenu', 'routine'),
allowNull: true
......@@ -35,20 +35,15 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
});
if (dialect === 'postgres') {
it('should be able to drop the specified enum', function() {
return this.queryInterface.removeColumn('menus', 'structuretype').then(() => {
return this.queryInterface.pgListEnums('menus');
}).then(enumList => {
expect(enumList).to.have.lengthOf(1);
expect(enumList[0]).to.have.property('enum_name').and.to.equal('enum_menus_structuretype');
}).then(() => {
return this.queryInterface.dropEnum('enum_menus_structuretype');
}).then(() => {
return this.queryInterface.pgListEnums('menus');
}).then(enumList => {
expect(enumList).to.be.an('array');
expect(enumList).to.have.lengthOf(0);
});
it('should be able to drop the specified enum', async function() {
await this.queryInterface.removeColumn('menus', 'structuretype');
const enumList0 = await this.queryInterface.pgListEnums('menus');
expect(enumList0).to.have.lengthOf(1);
expect(enumList0[0]).to.have.property('enum_name').and.to.equal('enum_menus_structuretype');
await this.queryInterface.dropEnum('enum_menus_structuretype');
const enumList = await this.queryInterface.pgListEnums('menus');
expect(enumList).to.be.an('array');
expect(enumList).to.have.lengthOf(0);
});
}
});
......
......@@ -12,14 +12,14 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
this.queryInterface = this.sequelize.getQueryInterface();
});
afterEach(function() {
return Support.dropTestSchemas(this.sequelize);
afterEach(async function() {
await Support.dropTestSchemas(this.sequelize);
});
describe('removeColumn', () => {
describe('(without a schema)', () => {
beforeEach(function() {
return this.queryInterface.createTable('users', {
beforeEach(async function() {
await this.queryInterface.createTable('users', {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
......@@ -46,41 +46,31 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
});
});
it('should be able to remove a column with a default value', function() {
return this.queryInterface.removeColumn('users', 'firstName').then(() => {
return this.queryInterface.describeTable('users');
}).then(table => {
expect(table).to.not.have.property('firstName');
});
it('should be able to remove a column with a default value', async function() {
await this.queryInterface.removeColumn('users', 'firstName');
const table = await this.queryInterface.describeTable('users');
expect(table).to.not.have.property('firstName');
});
it('should be able to remove a column without default value', function() {
return this.queryInterface.removeColumn('users', 'lastName').then(() => {
return this.queryInterface.describeTable('users');
}).then(table => {
expect(table).to.not.have.property('lastName');
});
it('should be able to remove a column without default value', async function() {
await this.queryInterface.removeColumn('users', 'lastName');
const table = await this.queryInterface.describeTable('users');
expect(table).to.not.have.property('lastName');
});
it('should be able to remove a column with a foreign key constraint', function() {
return this.queryInterface.removeColumn('users', 'manager').then(() => {
return this.queryInterface.describeTable('users');
}).then(table => {
expect(table).to.not.have.property('manager');
});
it('should be able to remove a column with a foreign key constraint', async function() {
await this.queryInterface.removeColumn('users', 'manager');
const table = await this.queryInterface.describeTable('users');
expect(table).to.not.have.property('manager');
});
it('should be able to remove a column with primaryKey', function() {
return this.queryInterface.removeColumn('users', 'manager').then(() => {
return this.queryInterface.describeTable('users');
}).then(table => {
expect(table).to.not.have.property('manager');
return this.queryInterface.removeColumn('users', 'id');
}).then(() => {
return this.queryInterface.describeTable('users');
}).then(table => {
expect(table).to.not.have.property('id');
});
it('should be able to remove a column with primaryKey', async function() {
await this.queryInterface.removeColumn('users', 'manager');
const table0 = await this.queryInterface.describeTable('users');
expect(table0).to.not.have.property('manager');
await this.queryInterface.removeColumn('users', 'id');
const table = await this.queryInterface.describeTable('users');
expect(table).to.not.have.property('id');
});
// From MSSQL documentation on ALTER COLUMN:
......@@ -88,85 +78,83 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
// - Used in a CHECK or UNIQUE constraint.
// https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql#arguments
if (dialect !== 'mssql') {
it('should be able to remove a column with unique contraint', function() {
return this.queryInterface.removeColumn('users', 'email').then(() => {
return this.queryInterface.describeTable('users');
}).then(table => {
expect(table).to.not.have.property('email');
});
it('should be able to remove a column with unique contraint', async function() {
await this.queryInterface.removeColumn('users', 'email');
const table = await this.queryInterface.describeTable('users');
expect(table).to.not.have.property('email');
});
}
});
describe('(with a schema)', () => {
beforeEach(function() {
return this.sequelize.createSchema('archive').then(() => {
return this.queryInterface.createTable({
tableName: 'users',
schema: 'archive'
}, {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
firstName: {
type: DataTypes.STRING,
defaultValue: 'Someone'
},
lastName: {
type: DataTypes.STRING
},
email: {
type: DataTypes.STRING,
unique: true
}
});
beforeEach(async function() {
await this.sequelize.createSchema('archive');
await this.queryInterface.createTable({
tableName: 'users',
schema: 'archive'
}, {
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true
},
firstName: {
type: DataTypes.STRING,
defaultValue: 'Someone'
},
lastName: {
type: DataTypes.STRING
},
email: {
type: DataTypes.STRING,
unique: true
}
});
});
it('should be able to remove a column with a default value', function() {
return this.queryInterface.removeColumn({
it('should be able to remove a column with a default value', async function() {
await this.queryInterface.removeColumn({
tableName: 'users',
schema: 'archive'
}, 'firstName'
).then(() => {
return this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
});
}).then(table => {
expect(table).to.not.have.property('firstName');
);
const table = await this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
});
expect(table).to.not.have.property('firstName');
});
it('should be able to remove a column without default value', function() {
return this.queryInterface.removeColumn({
it('should be able to remove a column without default value', async function() {
await this.queryInterface.removeColumn({
tableName: 'users',
schema: 'archive'
}, 'lastName'
).then(() => {
return this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
});
}).then(table => {
expect(table).to.not.have.property('lastName');
);
const table = await this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
});
expect(table).to.not.have.property('lastName');
});
it('should be able to remove a column with primaryKey', function() {
return this.queryInterface.removeColumn({
it('should be able to remove a column with primaryKey', async function() {
await this.queryInterface.removeColumn({
tableName: 'users',
schema: 'archive'
}, 'id');
const table = await this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
}, 'id').then(() => {
return this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
});
}).then(table => {
expect(table).to.not.have.property('id');
});
expect(table).to.not.have.property('id');
});
// From MSSQL documentation on ALTER COLUMN:
......@@ -174,18 +162,18 @@ describe(Support.getTestDialectTeaser('QueryInterface'), () => {
// - Used in a CHECK or UNIQUE constraint.
// https://docs.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql#arguments
if (dialect !== 'mssql') {
it('should be able to remove a column with unique contraint', function() {
return this.queryInterface.removeColumn({
it('should be able to remove a column with unique contraint', async function() {
await this.queryInterface.removeColumn({
tableName: 'users',
schema: 'archive'
}, 'email');
const table = await this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
}, 'email').then(() => {
return this.queryInterface.describeTable({
tableName: 'users',
schema: 'archive'
});
}).then(table => {
expect(table).to.not.have.property('email');
});
expect(table).to.not.have.property('email');
});
}
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!