Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 18 additions & 23 deletions test/functional/collections.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,33 @@ describe('#collections', function() {
let app = null;
let client = null;

before(function() {
return launchCompass().then(function(application) {
app = application;
client = application.client;
client.connectToCompass({ hostname: 'localhost', port: 27018 });
const dataService = new DataService(CONNECTION);
before(function(done) {
dataService.connect(function() {
dataService.createCollection('music.artists', {}, function() {
done();
});
});
});

after(function() {
return quitCompass(app);
after(function(done) {
dataService.dropDatabase('music', function() {
dataService.disconnect();
done();
});
});

context('when creating & deleting collections', function() {
const dataService = new DataService(CONNECTION);

before(function(done) {
dataService.connect(function() {
dataService.createCollection('music.artists', {}, function() {
return client
.clickInstanceRefreshIcon()
.waitForInstanceRefresh().then(function() {
done();
});
});
before(function() {
return launchCompass().then(function(application) {
app = application;
client = application.client;
client.connectToCompass({ hostname: 'localhost', port: 27018 });
});
});

after(function(done) {
dataService.dropDatabase('music', function() {
dataService.disconnect();
done();
});
after(function() {
return quitCompass(app);
});

context('when viewing the database', function() {
Expand Down