2.2.4 • Published 3 years ago

@mimik/test-helper v2.2.4

Weekly downloads
-
License
MIT
Repository
bitbucket
Last release
3 years ago

test-helper

Example

const testHelper = require('@mimik/test-helper');

test-helper~runTests(conf, tests) ⇒ null

Run all tests using test-helper

Kind: inner method of test-helper
Category: async

ParamTypeDescription
confstringConfig to setup test helper to run test
testsfunctionFunction containing mocha tests to run after and if test-helper is initialized successfully

Example

conf: {
 fixtures: {}, // All fixtures values
 serviceConfiguration: file, // ./configuration/config.js
 services: [
   MID: 'mID'
 ]
 users: [{ // Array of users to be created for the test
   userKey, // This is going to be stored in the test to identify user in userHelper
   email, // Email of user
   password, // Password of user
 }]
}

test-helper~importTest(name, testFilePath, perpFilePath) ⇒ null

Import test scripts from other files to run using test-helper

Kind: inner method of test-helper
Returns: null - perpFilePath: This file can have loadReal, unloadReal, loadMock and unloadMock methods. 'load' and 'unload' methods run before and after the test respectively
Category: async

ParamTypeDescription
namestringName of the test to run
testFilePathstringAbsolute file path of test scripts to be ran
perpFilePathstring(optional) Absolute file path of prep scripts to be ran before and after the test
2.2.4

3 years ago

2.2.2

4 years ago

2.2.1

4 years ago

1.2.0

6 years ago

1.1.4

6 years ago

1.1.3

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago