0.7.0 • Published 4 years ago

@lano/morpheus v0.7.0

Weekly downloads
24
License
MIT
Repository
github
Last release
4 years ago

Morpheus

Export your Insomnia workspace and test it in command line.

demo

Installation

yarn add -DE @lano/morpheus jest

Create a morpheus.config.js and put this content

// morpheus.config.js
module.exports = {
  verbose: true,
  rootDir: __dirname,
  snapshotResolver: "<rootDir>/node_modules/@lano/morpheus/snapshotResolver.js",
  testMatch: ["<rootDir>/node_modules/@lano/morpheus/tests/morpheus.spec.js"],
  testPathIgnorePatterns: []
};

Usage

By default Morpheus search look for a file named /Insomnia.*\.json/i

{
  "scripts": {
    "test:api": "jest --config=morpheus.config.js"
  }
}

Example

The generated snapshot will look like the following. Keep in mind that the date header is removed to not break the snapshots.

Object {
  "body": "OK",
  "description": "",
  "headers": Object {
    "connection": "close",
    "content-length": "2",
    "content-type": "text/plain; charset=utf-8",
  },
  "statusCode": 200,
  "url": "http://localhost:5000/auth/basic",
}

To do

In file.ts take the most recent file using fs.statSync is there are multiples Insomnia files

0.7.0

4 years ago

0.6.2

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

5 years ago

0.1.0

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago