Compare commits
5 Commits
failing-up
...
update-pac
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a308a33491 | ||
|
|
191ad5507c | ||
|
|
281d147b96 | ||
|
|
52958ffd9f | ||
|
|
3f5d548634 |
@@ -23,7 +23,7 @@ base-build: &base-build
|
||||
- node_modules
|
||||
- run:
|
||||
name: Lint
|
||||
command: npm run verify:js
|
||||
command: npm run verify -- --silent
|
||||
- run:
|
||||
name: Test
|
||||
command: npm run test:once
|
||||
|
||||
@@ -36,6 +36,8 @@
|
||||
## Overview
|
||||
`ftp-srv` is a modern and extensible FTP server designed to be simple yet configurable.
|
||||
|
||||
You can use `ftp-srv` to traverse the file system on the server, but it's biggest strength comes from it's customizable file system. This allows you to serve a custom, dynamic, or unique file system to users. You can even server a different system depending on the user connecting.
|
||||
|
||||
## Features
|
||||
- Extensible [file systems](#file-system) per connection
|
||||
- Passive and active transfers
|
||||
@@ -124,6 +126,11 @@ __Allowable values:__
|
||||
#### `log`
|
||||
A [bunyan logger](https://github.com/trentm/node-bunyan) instance. Created by default.
|
||||
|
||||
Piping the output into bunyan will format logs nicely, eg:
|
||||
```
|
||||
$ node ./test/start.js | npx bunyan
|
||||
```
|
||||
|
||||
## CLI
|
||||
|
||||
`ftp-srv` also comes with a builtin CLI.
|
||||
|
||||
1068
package-lock.json
generated
1068
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@@ -33,9 +33,7 @@
|
||||
"start": "npm run dev",
|
||||
"test": "cross-env NODE_ENV=test mocha --opts config/testUnit/mocha.opts -w",
|
||||
"test:once": "cross-env NODE_ENV=test mocha --opts config/testUnit/mocha.opts",
|
||||
"verify": "npm run verify:js --silent",
|
||||
"verify:js": "eslint -c config/verify/.eslintrc \"src/**/*.js\" \"test/**/*.js\" \"config/**/*.js\" && echo ✅ verify:js success",
|
||||
"verify:js:fix": "eslint --fix -c config/verify/.eslintrc \"src/**/*.js\" \"test/**/*.js\" \"config/**/*.js\" && echo ✅ verify:js:fix success"
|
||||
"verify": "eslint -c config/verify/.eslintrc \"src/**/*.js\" \"test/**/*.js\""
|
||||
},
|
||||
"release": {
|
||||
"verifyConditions": "condition-circle"
|
||||
@@ -53,31 +51,30 @@
|
||||
"bunyan": "^1.8.12",
|
||||
"ip": "^1.1.5",
|
||||
"lodash": "^4.17.10",
|
||||
"moment": "^2.22.1",
|
||||
"uuid": "^3.2.1",
|
||||
"yargs": "^11.0.0"
|
||||
"moment": "^2.22.2",
|
||||
"uuid": "^3.3.2",
|
||||
"yargs": "^12.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@icetee/ftp": "^1.0.2",
|
||||
"chai": "^4.0.2",
|
||||
"condition-circle": "^1.6.0",
|
||||
"cross-env": "3.1.4",
|
||||
"@icetee/ftp": "^1.0.3",
|
||||
"chai": "^4.1.2",
|
||||
"condition-circle": "^2.0.1",
|
||||
"cross-env": "5.2.0",
|
||||
"cz-customizable": "5.2.0",
|
||||
"cz-customizable-ghooks": "1.5.0",
|
||||
"dotenv": "^4.0.0",
|
||||
"eslint": "4.5.0",
|
||||
"eslint-config-google": "0.8.0",
|
||||
"eslint-friendly-formatter": "3.0.0",
|
||||
"eslint-plugin-mocha": "^4.11.0",
|
||||
"eslint-plugin-node": "5.1.1",
|
||||
"husky": "0.13.3",
|
||||
"eslint": "5.3.0",
|
||||
"eslint-config-google": "0.9.1",
|
||||
"eslint-friendly-formatter": "4.0.1",
|
||||
"eslint-plugin-mocha": "^5.1.0",
|
||||
"eslint-plugin-node": "7.0.1",
|
||||
"husky": "0.14.3",
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "^5.2.0",
|
||||
"mocha-junit-reporter": "1.13.0",
|
||||
"mocha-multi-reporters": "1.1.5",
|
||||
"rimraf": "2.6.1",
|
||||
"semantic-release": "^15.10.6",
|
||||
"sinon": "^2.3.5"
|
||||
"mocha-junit-reporter": "1.18.0",
|
||||
"mocha-multi-reporters": "1.1.7",
|
||||
"rimraf": "2.6.2",
|
||||
"semantic-release": "^15.9.8",
|
||||
"sinon": "^6.1.5"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6.x",
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('FtpCommands', function () {
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
commands = new FtpCommands(mockConnection);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ describe.skip(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
sandbox.spy(mockClient.connector, 'waitForConnection');
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -16,7 +16,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
sandbox.spy(mockClient.fs, 'chdir');
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'chdir').resolves();
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'delete').resolves();
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
sandbox.stub(ActiveConnector.prototype, 'setupConnection').resolves();
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(PassiveConnector.prototype, 'setupServer').resolves({
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'get').resolves({
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'get').resolves({mtime: 'Mon, 10 Oct 2011 23:24:11 GMT'});
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'mkdir').resolves();
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'get').resolves({
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient, 'login').resolves();
|
||||
|
||||
@@ -12,7 +12,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
sandbox.stub(ActiveConnector.prototype, 'setupConnection').resolves();
|
||||
|
||||
@@ -12,7 +12,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
sandbox.stub(mockClient.fs, 'currentDirectory').resolves();
|
||||
|
||||
@@ -10,7 +10,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'close').resolves();
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -25,7 +25,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.fs = {
|
||||
read: () => {}
|
||||
|
||||
@@ -10,7 +10,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.renameFrom = 'test';
|
||||
mockClient.fs = {
|
||||
|
||||
@@ -10,7 +10,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.renameFrom = 'test';
|
||||
mockClient.fs = {
|
||||
|
||||
@@ -10,7 +10,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../../src/commands/registration/site/${CMD.toLowerCase()}`).bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.fs = {
|
||||
chmod: () => Promise.resolve()
|
||||
|
||||
@@ -17,7 +17,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.stub(mockClient, 'reply').resolves();
|
||||
});
|
||||
|
||||
@@ -10,7 +10,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.fs = {
|
||||
get: () => Promise.resolve({size: 1})
|
||||
|
||||
@@ -10,7 +10,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.fs = {
|
||||
get: () => Promise.resolve({}),
|
||||
|
||||
@@ -25,7 +25,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.fs = {
|
||||
write: () => {}
|
||||
|
||||
@@ -13,7 +13,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.fs = {
|
||||
get: () => Promise.resolve(),
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
});
|
||||
|
||||
@@ -11,7 +11,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
mockClient.transferType = null;
|
||||
sandbox.spy(mockClient, 'reply');
|
||||
|
||||
@@ -16,7 +16,7 @@ describe(CMD, function () {
|
||||
const cmdFn = require(`../../../src/commands/registration/${CMD.toLowerCase()}`).handler.bind(mockClient);
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
delete mockClient.username;
|
||||
mockClient.server.options = {};
|
||||
|
||||
@@ -20,7 +20,7 @@ describe('Connector - Active //', function () {
|
||||
active = new ActiveConnector(mockConnection);
|
||||
});
|
||||
beforeEach((done) => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
getNextPort()
|
||||
.then((port) => {
|
||||
|
||||
@@ -9,7 +9,7 @@ describe('helpers // file-stat', function () {
|
||||
let sandbox;
|
||||
|
||||
before(function () {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
});
|
||||
afterEach(function () {
|
||||
sandbox.restore();
|
||||
|
||||
@@ -10,7 +10,7 @@ describe('helpers // find-port', function () {
|
||||
let getNextPort;
|
||||
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
|
||||
getNextPort = getNextPortFactory(1, 2);
|
||||
});
|
||||
|
||||
@@ -7,7 +7,7 @@ describe('helpers //resolve-host', function () {
|
||||
|
||||
let sandbox;
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
});
|
||||
afterEach(() => sandbox.restore());
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('Integration', function () {
|
||||
return startServer({url: 'ftp://127.0.0.1:8880'});
|
||||
});
|
||||
beforeEach(() => {
|
||||
sandbox = sinon.sandbox.create().usingPromise(Promise);
|
||||
sandbox = sinon.createSandbox().usingPromise(Promise);
|
||||
});
|
||||
afterEach(() => sandbox.restore());
|
||||
after(() => server.close());
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
require('dotenv').load();
|
||||
const bunyan = require('bunyan');
|
||||
const fs = require('fs');
|
||||
const FtpServer = require('../src');
|
||||
|
||||
Reference in New Issue
Block a user