mirror of
https://github.com/knex/knex.git
synced 2025-12-27 06:58:39 +00:00
Properly remove seed test file to prevent jshint warning
This commit is contained in:
parent
eec5bdc4f6
commit
d77debbaa8
@ -1,4 +1,4 @@
|
||||
/*global after, describe, it, expect*/
|
||||
/*global describe, it, expect*/
|
||||
'use strict';
|
||||
|
||||
var path = require('path');
|
||||
@ -6,11 +6,10 @@ var rimraf = require('rimraf');
|
||||
|
||||
module.exports = function(knex) {
|
||||
|
||||
require('rimraf').sync(path.join(__dirname, './seed'));
|
||||
|
||||
describe('knex.seed.make', function() {
|
||||
it('should create a new seed file with the make method', function () {
|
||||
return knex.seed.make('test').then(function (name) {
|
||||
rimraf.sync(path.dirname(name));
|
||||
expect(path.basename(name)).to.equal('test.js');
|
||||
});
|
||||
});
|
||||
@ -25,8 +24,4 @@ module.exports = function(knex) {
|
||||
});
|
||||
});
|
||||
|
||||
after(function() {
|
||||
rimraf.sync(path.join(__dirname, './seed'));
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
@ -1,5 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
exports.seed = function(knex) {
|
||||
knex('tableName').insert({colName: 'rowValue'});
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user