Skip to content

Commit 0fded99

Browse files
committed
fix index_test tests
1 parent 37ecd3a commit 0fded99

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

test/driver/index_test.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,21 @@ var indexConnectCallback = function(self, tunnelStub, driverSpy) {
2323
db.close(function() {
2424
self.callback(err, db, tunnelStub, driverSpy);
2525
});
26-
}
26+
};
2727
};
2828

2929
vows.describe('index').addBatch({
3030
'a connection with ssh tunnel': {
3131
topic: function() {
3232
// Ensure that require gets a new copy of the module for each test
33-
delete require.cache[require.resolve('../../lib/driver/mysql')];
34-
var driver = require('../../lib/driver/mysql');
33+
delete require.cache[require.resolve('db-migrate-mysql')];
34+
var driver = require('db-migrate-mysql');
3535

3636
// Set up stubs/spies to verify correct flow
3737
var driverSpy = sinon.spy(driver, 'connect');
3838
var tunnelStub = sinon.stub().callsArg(1);
3939

40-
var index = proxyquire('../../lib/driver/index', {
40+
var index = proxyquire('db-migrate-index', {
4141
'tunnel-ssh': tunnelStub,
4242
'./mysql': driver
4343
});
@@ -78,27 +78,27 @@ vows.describe('index').addBatch({
7878
'a failed tunnel connection': {
7979
topic: function() {
8080
// Ensure that require gets a new copy of the module for each test
81-
delete require.cache[require.resolve('../../lib/driver/mysql')];
82-
var driver = require('../../lib/driver/mysql');
81+
delete require.cache[require.resolve('db-migrate-mysql')];
82+
var driver = require('db-migrate-mysql');
8383

8484
// Set up stubs/spies to verify correct flow
85-
var tunnelStub = sinon.stub().callsArgWith(1, new Error("error"));
85+
var tunnelStub = sinon.stub().callsArgWith(1, new Error('error'));
8686
var driverSpy = sinon.spy(driver, 'connect');
8787

88-
var index = proxyquire('../../lib/driver/index', {
88+
var index = proxyquire('db-migrate-index', {
8989
'tunnel-ssh': tunnelStub,
9090
'./mysql': driver
9191
});
9292

9393
index.connect(validDbConfigWithTunnel, {}, indexConnectCallback(this, tunnelStub, driverSpy));
9494
},
9595
'should pass the error to the callback': function (err, db) {
96-
assert(err, "err should be non-null");
97-
assert(!db, "driver should be null or undefined");
96+
assert(err, 'err should be non-null');
97+
assert(!db, 'driver should be null or undefined');
9898
},
9999
'should call tunnel, but not driver.connect': function (err, db, tunnelStub, driverSpy) {
100-
assert(tunnelStub.calledOnce, "tunnel should be called once");
101-
assert(driverSpy.notCalled, "driver.connect should not be called");
100+
assert(tunnelStub.calledOnce, 'tunnel should be called once');
101+
assert(driverSpy.notCalled, 'driver.connect should not be called');
102102
}
103103
}
104-
}).export(module);
104+
}).export(module);

0 commit comments

Comments
 (0)