Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.
/ mystique-server Public archive

👾 A mock-server generator for using in node.js E2E tests.

License

Notifications You must be signed in to change notification settings

Tap30/mystique-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mystique-server

👾 A simple mock-server for using in node.js E2E tests.

Usage

async function test() {
  let mockServer = await createMockRestServer(8585);
  let promise = codeThatCallsEndpoint({number: 20});
  await mockServer.post('/endpoint', async function (req) {
    assert(req.body.number === 20, 'number should be 20');
    return {result: 'ok'}
  });
  let {result} = await promise;

  assert(result === 'okay', 'result must be okay');

  console.log('done');
}

License

This project is licensed under the MIT License - see the LICENSE file for details

About

👾 A mock-server generator for using in node.js E2E tests.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published