testem 3.15.0 → 3.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/app.js CHANGED
@@ -5,7 +5,7 @@ const Bluebird = require('bluebird');
5
5
  const Path = require('path');
6
6
  const log = require('npmlog');
7
7
  const StyledString = require('styled_string');
8
- const find = require('lodash.find');
8
+ const _ = require('lodash');
9
9
 
10
10
  const Server = require('./server');
11
11
  const BrowserTestRunner = require('./runners/browser_test_runner');
@@ -251,7 +251,7 @@ module.exports = class App extends EventEmitter {
251
251
  }
252
252
 
253
253
  onBrowserLogin(browserName, id, socket) {
254
- let browser = find(this.runners, runner => {
254
+ let browser = _.find(this.runners, runner => {
255
255
  return runner.launcherId === id && (!runner.socket || !runner.socket.connected);
256
256
  });
257
257
 
@@ -270,7 +270,7 @@ module.exports = class App extends EventEmitter {
270
270
  }
271
271
 
272
272
  onBrowserRelogin(browserName, id, socket) {
273
- let browser = find(this.runners, runner => {
273
+ let browser = _.find(this.runners, runner => {
274
274
  // a browser relogin can happen if a client socket was disconnected, which may not be reflected in runner.socket's connected state
275
275
  // or if the socket was nulled by 'onDisconnect'
276
276
  return runner.launcherId === id && (runner.socket || runner.socket === null);
package/lib/config.js CHANGED
@@ -25,7 +25,7 @@ const Chars = require('./utils/chars');
25
25
  const pad = require('./utils/strutils').pad;
26
26
  const isa = require('./utils/isa');
27
27
  const fileExists = require('./utils/fileutils').fileExists;
28
- const uniqBy = require('lodash.uniqby');
28
+ const _ = require('lodash');
29
29
 
30
30
  const knownBrowsers = require('./utils/known-browsers');
31
31
  const globAsync = Bluebird.promisify(glob);
@@ -325,7 +325,13 @@ class Config {
325
325
  if (this.appMode === 'dev' || this.get('ignore_missing_launchers')) {
326
326
  log.warn('Launcher "' + name + '" is not recognized.');
327
327
  } else {
328
- err = new Error('Launcher ' + name + ' not found. Not installed?');
328
+ err = new Error(
329
+ 'Launcher ' +
330
+ name +
331
+ ' not found. Not installed? Available: ' +
332
+ Object.keys(available).map(elm => `"${elm}"`).join(', ') +
333
+ '.'
334
+ );
329
335
  }
330
336
  } else {
331
337
  launchers.push(launcher);
@@ -408,7 +414,7 @@ class Config {
408
414
  return {src: f, attrs: attrs};
409
415
  })));
410
416
  }, [])
411
- .then(result => uniqBy(result, 'src'))
417
+ .then(result => _.uniqBy(result, 'src'))
412
418
  .asCallback(callback);
413
419
  }
414
420
 
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const Launcher = require('./launcher');
4
- const extend = require('lodash.assignin');
4
+ const _ = require('lodash');
5
5
 
6
6
  function getUniqueId() {
7
7
  return process.hrtime().join('');
@@ -16,7 +16,7 @@ module.exports = class LauncherFactory {
16
16
 
17
17
  create(options) {
18
18
  const id = getUniqueId();
19
- const settings = extend({ id }, this.settings, options);
19
+ const settings = _.assignIn({ id }, this.settings, options);
20
20
  return new Launcher(this.name, settings, this.config);
21
21
  }
22
22
  };
@@ -6,7 +6,7 @@ const Bluebird = require('bluebird');
6
6
  const util = require('util');
7
7
  const EventEmitter = require('events').EventEmitter;
8
8
  const spawnargs = require('spawn-args');
9
- const extend = require('lodash.assignin');
9
+ const _ = require('lodash');
10
10
 
11
11
  const envWithLocalPath = require('./utils/env-with-local-path');
12
12
  const fileutils = require('./utils/fileutils');
@@ -32,7 +32,7 @@ module.exports = class ProcessCtl extends EventEmitter {
32
32
  env: envWithLocalPath(this.config)
33
33
  };
34
34
 
35
- return extend({}, defaults, options);
35
+ return _.assignIn({}, defaults, options);
36
36
  }
37
37
 
38
38
  _spawn(exe, args, options) {
@@ -136,10 +136,10 @@ class Server extends EventEmitter {
136
136
 
137
137
  this.injectMiddleware(app);
138
138
 
139
- this.configureProxy(app);
140
-
141
139
  app.use('/testem', express.static(`${__dirname}/../../public/testem`));
142
140
 
141
+ this.configureProxy(app);
142
+
143
143
  app.get('/', (req, res) => {
144
144
  res.redirect(`/${String(Math.floor(Math.random() * 10000))}`);
145
145
  });
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const cloneDeep = require('lodash.clonedeep');
3
+ const _ = require('lodash');
4
4
  const isWin = require('./is-win')();
5
5
  let PATH = 'PATH';
6
6
  let delimiter = ':';
@@ -17,7 +17,7 @@ if (isWin) {
17
17
  }
18
18
 
19
19
  module.exports = function addToPATH(path) {
20
- let env = cloneDeep(process.env);
20
+ let env = _.cloneDeep(process.env);
21
21
  env[PATH] = [path, env[PATH]].join(delimiter);
22
22
 
23
23
  return env;
@@ -2,7 +2,7 @@
2
2
 
3
3
  const capitalize = require('./capitalize');
4
4
  const log = require('npmlog');
5
- const castArray = require('lodash.castarray');
5
+ const _ = require('lodash');
6
6
 
7
7
  function Validation() {
8
8
  this.knownBrowser = null;
@@ -22,7 +22,7 @@ function hasOldBrowserArgsFormat(args) {
22
22
  // Lodash's castArray function will turn `undefined` into `[undefined]`, but we want an empty array in that case.
23
23
  function safeCastArray(value) {
24
24
  if (value) {
25
- return castArray(value);
25
+ return _.castArray(value);
26
26
  } else {
27
27
  return [];
28
28
  }
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "unittest",
8
8
  "browser"
9
9
  ],
10
- "version": "3.15.0",
10
+ "version": "3.15.2",
11
11
  "author": "Toby Ho <airportyh@gmail.com>",
12
12
  "repository": {
13
13
  "type": "git",
@@ -34,11 +34,7 @@
34
34
  "glob": "^7.0.4",
35
35
  "http-proxy": "^1.13.1",
36
36
  "js-yaml": "^3.2.5",
37
- "lodash.assignin": "^4.1.0",
38
- "lodash.castarray": "^4.4.0",
39
- "lodash.clonedeep": "^4.4.1",
40
- "lodash.find": "^4.5.1",
41
- "lodash.uniqby": "^4.7.0",
37
+ "lodash": "^4.17.21",
42
38
  "mkdirp": "^3.0.1",
43
39
  "mustache": "^4.2.0",
44
40
  "node-notifier": "^10.0.0",
@@ -74,7 +70,7 @@
74
70
  "chai": "^4.0.2",
75
71
  "chai-files": "^1.2.0",
76
72
  "chai-shallow-deep-equal": "^1.4.4",
77
- "cheerio": "^1.0.0-rc.2",
73
+ "cheerio": "1.0.0-rc.12",
78
74
  "dirty-chai": "^2.0.0",
79
75
  "eslint": "^8.12.0",
80
76
  "eslint-plugin-chai-expect": "^3.0.0",
@@ -83,7 +79,7 @@
83
79
  "request": "^2.51.0",
84
80
  "saucie": "^3.3.3",
85
81
  "shelljs": "^0.8.2",
86
- "sinon": "^15.0.0",
82
+ "sinon": "10.0.0",
87
83
  "sinon-chai": "^3.2.0",
88
84
  "socket.io-client": "^4.1.2",
89
85
  "tape": "^5.2.2"
@@ -91,6 +87,5 @@
91
87
  "bin": {
92
88
  "testem": "./testem.js"
93
89
  },
94
- "main": "./lib/api.js",
95
- "optionalDependencies": {}
90
+ "main": "./lib/api.js"
96
91
  }