Skip to content

Commit 95753e6

Browse files
author
DavertMik
committed
refactored mocha, implemented hooks
1 parent 6be8fae commit 95753e6

File tree

21 files changed

+296
-1597
lines changed

21 files changed

+296
-1597
lines changed

lib/cli.js

Lines changed: 0 additions & 257 deletions
This file was deleted.

lib/codecept.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class Codecept {
8484
global.codeceptjs = require('./index'); // load all objects
8585

8686
// BDD
87-
const stepDefinitions = require('./interfaces/bdd');
87+
const stepDefinitions = require('./mocha/bdd');
8888
global.Given = stepDefinitions.Given;
8989
global.When = stepDefinitions.When;
9090
global.Then = stepDefinitions.Then;

lib/command/gherkin/snippets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const fsPath = require('path');
88
const { getConfig, getTestRoot } = require('../utils');
99
const Codecept = require('../../codecept');
1010
const output = require('../../output');
11-
const { matchStep } = require('../../interfaces/bdd');
11+
const { matchStep } = require('../../mocha/bdd');
1212

1313
const uuidFn = Messages.IdGenerator.uuid();
1414
const builder = new Gherkin.AstBuilder(uuidFn);

lib/command/gherkin/steps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { getConfig, getTestRoot } = require('../utils');
22
const Codecept = require('../../codecept');
33
const output = require('../../output');
4-
const { getSteps } = require('../../interfaces/bdd');
4+
const { getSteps } = require('../../mocha/bdd');
55

66
module.exports = function (genPath, options) {
77
const configFile = options.config || genPath;

lib/container.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const path = require('path');
33
const { MetaStep } = require('./step');
44
const { methodsOfObject, fileExists, isFunction, isAsyncFunction, installedLocally } = require('./utils');
55
const Translation = require('./translation');
6-
const MochaFactory = require('./mochaFactory');
6+
const MochaFactory = require('./mocha/factory');
77
const recorder = require('./recorder');
88
const event = require('./event');
99
const WorkerStorage = require('./workerStorage');

lib/event.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module.exports = {
6060
passed: 'hook.passed',
6161
failed: 'hook.failed',
6262
},
63+
6364
/**
6465
* @type {object}
6566
* @constant

lib/interfaces/bdd.js

Lines changed: 0 additions & 81 deletions
This file was deleted.

0 commit comments

Comments
 (0)