E2ENow is an end-to-end testing library made to get feedback from developers from around the world.
- Simple
- Easy to learn/understand
Create an issue to point out bad practices, improvements or any changes that you may think could improve this "library".
npm i --save-dev e2e-now
import E2ENow from 'e2e-now';
const e2e = E2ENow.create({
url: "https://jsonplaceholder.typicode.com",
basePath: "/",
modules: [
<module-list>,
]
});
e2e.exec();
You need to created modules for each url. To create a simple module just do:
import {TestModule} from 'e2e-now';
const moduleName = TestModule.create('/<base-url-to-test>');
moduleName.test('/<current-url-to-test>', 'get', [
<test-list>,
]);
Tests are used to test different test cases for same url, like for authentication url there might be cases where user enter wrong id or password.
const todosUpdateTest = todosModule
.createTest('Updating a todo')
.request({
body: {
title: 'test',
completed: true
},
query: {
id: 1,
},
params: {
id: 1
},
headers: {
'Content-Type': 'application/json'
}
})
.response({
status: 200,
body: {
userId: 1,
id: 1,
title: 'delectus aut autem',
completed: false
},
headers: {
'content-type': 'application/json; charset=utf-8'
}
});
Want to contribute? Great!
Create an issue to point out bad practices, improvements or any changes that you may think could improve this "library".
MIT
Free Software, Hell Yeah!