Skip to content

Commit 1c2fd60

Browse files
committed
Cleanup
1 parent 4e1d2af commit 1c2fd60

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

chapter-18/starships/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.node-persist
22
.env*
3-
data/mongo/*
3+
data/mongo/*
4+
node_modules
5+
tests/test.test.js

chapter-18/starships/tests/setup.model.test.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,23 @@ const MongoDB = require('../models/mongo')
22
const insertRandomNames = require('../models/setup')
33

44
describe('insert', () => {
5-
let db;
5+
let db
66

77
beforeAll(async () => {
88
db = await MongoDB.connectDB('test')
9-
});
9+
})
1010

1111
afterAll(async (done) => {
1212
await db.collection('names').deleteMany({})
1313
await MongoDB.disconnectDB()
1414
done()
15-
});
16-
17-
beforeEach(async () => {
18-
19-
});
15+
})
2016

2117
it('should insert the random names', async () => {
2218
await insertRandomNames()
2319

2420
const names = await db.collection("names").find().toArray()
2521
expect(names.length).toBeGreaterThan(0)
26-
});
22+
})
2723

28-
});
24+
})

0 commit comments

Comments
 (0)