Skip to content

Commit

Permalink
small test adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
izelnakri committed Oct 26, 2017
1 parent 0e49715 commit bdb1f17
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions test/mem-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ describe('MemServer', function() {
assert.equal(model.modelName, modelName);
assert.deepEqual(Object.keys(MemServer.Models[modelName]), [
'modelName', 'primaryKey', 'defaultAttributes', 'attributes', 'count', 'find', 'findBy',
'findAll', 'insert', 'bulkInsert', 'update', 'bulkUpdate', 'delete', 'bulkDelete',
'serialize'
'findAll', 'insert', 'update', 'delete', 'serialize'
]);
});
});
Expand Down
5 changes: 5 additions & 0 deletions test/mem-server.model.insert.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// TODO: $Model.insert() with new attributes append the new attributes to $Model.attributes
const assert = require('assert');
const fs = require('fs');
const rimraf = require('rimraf');
Expand Down Expand Up @@ -88,6 +89,10 @@ describe('MemServer.Model Insert Interface', function() {
`);
});

afterEach(function() {
Object.keys(require.cache).forEach((key) => delete require.cache[key]);
});

after(function(done) {
if (fs.existsSync(`${process.cwd()}/memserver`)) {
rimraf.sync(`${process.cwd()}/memserver`);
Expand Down

0 comments on commit bdb1f17

Please sign in to comment.