Skip to content

Commit 72fce59

Browse files
committed
remove parallel: true as it was deprecated
1 parent d39b821 commit 72fce59

File tree

6 files changed

+302
-293
lines changed

6 files changed

+302
-293
lines changed

test/config_test.js

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ var _configLoad = config.load;
88
var _configLoadUrl = config.loadUrl;
99

1010
lab.experiment('config', function () {
11-
lab.experiment('loading from a file', { parallel: true }, function () {
11+
lab.experiment('loading from a file', function () {
1212
var configPath = path.join(__dirname, 'database.json');
1313
var _config = config.load(configPath, 'dev');
1414

1515
lab.test(
1616
'should export all environment settings',
17-
{ parallel: true },
17+
1818
function (done) {
1919
Code.expect(_config.dev).to.exists();
2020
Code.expect(_config.test).to.exists();
@@ -26,7 +26,7 @@ lab.experiment('config', function () {
2626
lab.test(
2727
'should export a getCurrent function with all current ' +
2828
'environment settings',
29-
{ parallel: true },
29+
3030
function (done) {
3131
var current;
3232
Code.expect(_config.getCurrent).to.exists();
@@ -41,13 +41,11 @@ lab.experiment('config', function () {
4141

4242
lab.experiment(
4343
'loading from a broken config file',
44-
{ parallel: true },
44+
4545
function () {
4646
var configPath = path.join(__dirname, 'database_with_syntax_error.json');
4747

48-
lab.test('should throw a syntax error', { parallel: true }, function (
49-
done
50-
) {
48+
lab.test('should throw a syntax error', function (done) {
5149
Code.expect(
5250
config.load.bind(this, configPath, 'dev'),
5351
'Expected broken file to produce syntax error'
@@ -59,14 +57,14 @@ lab.experiment('config', function () {
5957

6058
lab.experiment(
6159
'loading from a file with default env option',
62-
{ parallel: true },
60+
6361
function () {
6462
var configPath = path.join(__dirname, 'database_with_default_env.json');
6563
var _config = config.load(configPath);
6664

6765
lab.test(
6866
'should load a value from the default env',
69-
{ parallel: true },
67+
7068
function (done) {
7169
var current = _config.getCurrent();
7270
Code.expect(current.env).to.equal('local');
@@ -80,7 +78,7 @@ lab.experiment('config', function () {
8078

8179
lab.experiment(
8280
'loading from a file with default env option in ENV variable',
83-
{ parallel: true },
81+
8482
function () {
8583
process.env.NODE_ENV = 'local';
8684
var configPath = path.join(
@@ -91,7 +89,7 @@ lab.experiment('config', function () {
9189

9290
lab.test(
9391
'should load a value from the env set in NODE_ENV',
94-
{ parallel: true },
92+
9593
function (done) {
9694
var current = _config.getCurrent();
9795
Code.expect(current.settings.driver).to.equal('sqlite3');
@@ -104,15 +102,15 @@ lab.experiment('config', function () {
104102

105103
lab.experiment(
106104
'loading from a file with ENV vars',
107-
{ parallel: true },
105+
108106
function () {
109107
process.env.DB_MIGRATE_TEST_VAR = 'username_from_env';
110108
var configPath = path.join(__dirname, 'database_with_env.json');
111109
var _config = config.load(configPath, 'prod');
112110

113111
lab.test(
114112
'should load a value from the environments',
115-
{ parallel: true },
113+
116114
function (done) {
117115
Code.expect(_config.prod.username).to.equal('username_from_env');
118116
done();
@@ -123,15 +121,15 @@ lab.experiment('config', function () {
123121

124122
lab.experiment(
125123
'loading from a file with ENV URL',
126-
{ parallel: true },
124+
127125
function () {
128126
process.env.DB_MIGRATE_TEST_VAR = 'postgres://uname:[email protected]/dbname';
129127
var configPath = path.join(__dirname, 'database_with_env_url.json');
130128
var _config = config.load(configPath, 'prod');
131129

132130
lab.test(
133131
'should load a value from the environments',
134-
{ parallel: true },
132+
135133
function (done) {
136134
var current = _config.getCurrent();
137135
Code.expect(current.settings.driver).to.equal('postgres');
@@ -145,13 +143,13 @@ lab.experiment('config', function () {
145143
}
146144
);
147145

148-
lab.experiment('loading from an URL', { parallel: true }, function () {
146+
lab.experiment('loading from an URL', function () {
149147
var databaseUrl = 'postgres://uname:[email protected]/dbname';
150148
var _config = config.loadUrl(databaseUrl, 'dev');
151149

152150
lab.test(
153151
'should export the settings as the current environment',
154-
{ parallel: true },
152+
155153
function (done) {
156154
Code.expect(_config.dev).to.exists();
157155
done();
@@ -161,7 +159,7 @@ lab.experiment('config', function () {
161159
lab.test(
162160
'should export a getCurrent function with all current ' +
163161
'environment settings',
164-
{ parallel: true },
162+
165163
function (done) {
166164
var current;
167165
Code.expect(_config.getCurrent).to.exists();

test/driver/base_test.js

Lines changed: 53 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var Code = require('code');
22
var Lab = require('lab');
3-
var lab = exports.lab = Lab.script();
3+
var lab = (exports.lab = Lab.script());
44
var Base = require('db-migrate-base');
55

66
var internals = {
@@ -11,80 +11,80 @@ var internals = {
1111
}
1212
};
1313

14-
lab.experiment('base', { parallel: true }, function () {
15-
lab.experiment('default implementation', { parallel: true }, function () {
14+
lab.experiment('base', function () {
15+
lab.experiment('default implementation', function () {
1616
var base = new Base(internals);
1717

18-
lab.test('inherits from EventEmitter', { parallel: true }, function (done) {
18+
lab.test('inherits from EventEmitter', function (done) {
1919
Code.expect(base.on).to.be.not.null();
2020
Code.expect(base.emit).to.be.not.null();
2121
done();
2222
});
2323

24-
lab.test('throws errors for all API methods', { parallel: true },
25-
function (done) {
26-
Code.expect(function () {
27-
base.createTable();
28-
}).to.throw(Error);
24+
lab.test('throws errors for all API methods', function (done) {
25+
Code.expect(function () {
26+
base.createTable();
27+
}).to.throw(Error);
2928

30-
Code.expect(function () {
31-
base.dropTable();
32-
}).to.throw(Error);
29+
Code.expect(function () {
30+
base.dropTable();
31+
}).to.throw(Error);
3332

34-
Code.expect(function () {
35-
base.addColumn();
36-
}).to.throw(Error);
33+
Code.expect(function () {
34+
base.addColumn();
35+
}).to.throw(Error);
3736

38-
Code.expect(function () {
39-
base.removeColumn();
40-
}).to.throw(Error);
37+
Code.expect(function () {
38+
base.removeColumn();
39+
}).to.throw(Error);
4140

42-
Code.expect(function () {
43-
base.renameColumn();
44-
}).to.throw(Error);
41+
Code.expect(function () {
42+
base.renameColumn();
43+
}).to.throw(Error);
4544

46-
Code.expect(function () {
47-
base.changeColumn();
48-
}).to.throw(Error);
45+
Code.expect(function () {
46+
base.changeColumn();
47+
}).to.throw(Error);
4948

50-
Code.expect(function () {
51-
base.addIndex();
52-
}).to.throw(Error);
49+
Code.expect(function () {
50+
base.addIndex();
51+
}).to.throw(Error);
5352

54-
Code.expect(function () {
55-
base.insert();
56-
}).to.throw(Error);
53+
Code.expect(function () {
54+
base.insert();
55+
}).to.throw(Error);
5756

58-
Code.expect(function () {
59-
base.removeIndex();
60-
}).to.throw(Error);
57+
Code.expect(function () {
58+
base.removeIndex();
59+
}).to.throw(Error);
6160

62-
Code.expect(function () {
63-
base.addAssociation();
64-
}).to.throw(Error);
61+
Code.expect(function () {
62+
base.addAssociation();
63+
}).to.throw(Error);
6564

66-
Code.expect(function () {
67-
base.removeAssociation();
68-
}).to.throw(Error);
65+
Code.expect(function () {
66+
base.removeAssociation();
67+
}).to.throw(Error);
6968

70-
Code.expect(function () {
71-
base.addForeignKey();
72-
}).to.throw(Error);
69+
Code.expect(function () {
70+
base.addForeignKey();
71+
}).to.throw(Error);
7372

74-
Code.expect(function () {
75-
base.removeForeignKey();
76-
}).to.throw(Error);
73+
Code.expect(function () {
74+
base.removeForeignKey();
75+
}).to.throw(Error);
7776

78-
Code.expect(function () {
79-
base.runSql();
80-
}).to.throw(Error);
77+
Code.expect(function () {
78+
base.runSql();
79+
}).to.throw(Error);
8180

82-
done();
83-
});
81+
done();
82+
});
8483

85-
lab.test('escapes single quotes', { parallel: true }, function (done) {
86-
Code.expect('Bill\'\'s Mother\'\'s House')
87-
.to.equal(base.escape('Bill\'s Mother\'s House'));
84+
lab.test('escapes single quotes', function (done) {
85+
Code.expect("Bill''s Mother''s House").to.equal(
86+
base.escape("Bill's Mother's House")
87+
);
8888
done();
8989
});
9090
});

test/integration/api_test.js

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ var sinon = require('sinon');
55
var proxyquire = require('proxyquire').noPreserveCache();
66
var Promise = require('bluebird');
77

8-
lab.experiment('api', { parallel: true }, function () {
8+
lab.experiment('api', function () {
99
lab.test(
1010
'force process exit after migrations have been run',
11-
{ parallel: true },
11+
1212
function (done, onCleanup) {
1313
var processExit = process.exit;
1414
var argv = process.argv;
@@ -83,9 +83,7 @@ lab.experiment('api', { parallel: true }, function () {
8383
}
8484
);
8585

86-
lab.test('should load config from parameter', { parallel: true }, function (
87-
done
88-
) {
86+
lab.test('should load config from parameter', function (done) {
8987
var options = {
9088
env: 'dev',
9189
cwd: process.cwd() + '/test/integration',
@@ -114,7 +112,7 @@ lab.experiment('api', { parallel: true }, function () {
114112

115113
lab.test(
116114
'should handle all up parameter variations properly',
117-
{ parallel: true },
115+
118116
function () {
119117
return Promise.resolve([
120118
[], // promise
@@ -135,7 +133,7 @@ lab.experiment('api', { parallel: true }, function () {
135133

136134
lab.test(
137135
'should handle all down parameter variations properly',
138-
{ parallel: true },
136+
139137
function () {
140138
return Promise.resolve([
141139
[], // promise
@@ -152,7 +150,7 @@ lab.experiment('api', { parallel: true }, function () {
152150

153151
lab.test(
154152
'should handle all reset parameter variations properly',
155-
{ parallel: true },
153+
156154
function () {
157155
return Promise.resolve([
158156
[], // promise
@@ -167,7 +165,7 @@ lab.experiment('api', { parallel: true }, function () {
167165

168166
lab.test(
169167
'should handle all sync parameter variations properly',
170-
{ parallel: true },
168+
171169
function () {
172170
return Promise.resolve([
173171
[],

0 commit comments

Comments
 (0)