Socket
Socket
Sign inDemoInstall

babel-plugin-intuitional-test-stringify

Package Overview
Dependencies
1
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.2 to 0.0.3

License

4

CHANGELOG.md

@@ -6,2 +6,6 @@ # Change Log

## [0.0.3](https://github.com/imcuttle/intuitional-test/compare/v0.0.2...v0.0.3) (2019-08-01)
**Note:** Version bump only for package babel-plugin-intuitional-test-stringify
## 0.0.2 (2019-08-01)

@@ -8,0 +12,0 @@

5

package.json
{
"name": "babel-plugin-intuitional-test-stringify",
"version": "0.0.2",
"version": "0.0.3",
"description": "> TODO: description",

@@ -28,3 +28,4 @@ "author": "imcuttle <moyuyc95@gmail.com>",

"url": "https://github.com/imcuttle/intuitional-test/issues"
}
},
"gitHead": "720270d10b5e5f5eaea8b1930b4197fd0ce09b2e"
}
# `babel-plugin-intuitional-test-stringify`
> TODO: description
> The babel plugin for intuitional test ast stringify.
## Usage
### Default Options
- Input
```javascript
// message
1 + 2 // => 3
```
const babelPluginIntuitionalTestStringify = require('babel-plugin-intuitional-test-stringify');
// TODO: DEMONSTRATE API
- Output
```javascript
var _looseEqual = require('assert').deepEqual
_looseEqual(1 + 2, 3, message)
```
### Jest Style Options
```json
{
"libraryTarget": "external",
"wrapTemplate": "it(MESSAGE, function() {return BODY});",
"libraryName": "expect",
"methodMapper": {
"looseNotEqual": "not.toEqual",
"looseEqual": "toEqual",
"strictEqual": "toBe",
"strictNotEqual": "not.toBe"
},
"expressionTemplate": "LIBRARY_NAME(ACTUAL).METHOD(EXPECTED)"
}
```
- Input
```javascript
// message
1 + 2 // => 3
```
- Output
```javascript
// message
it('message', function() {
return expect(1 + 2).toEqual(3)
}) // => 3
```
## Options
### libraryName
The assertion library name.
- Type: `string`
- Default: `'assert'`
### `libraryTarget`
- Type: `'named' | 'external'`
- Default: `'named'`
### `expressionTemplate`
The template for generating `_looseEqual(1 + 2, 3, message);` from example.
- Type: `string`
- Default: `'METHOD(ACTUAL, EXPECTED, MESSAGE);'`
### `methodMapper`
- Type: `{ strictEqual: string, looseEqual: string, looseNotEqual: string, strictNotEqual: string }`
- Default: `{ strictEqual: 'strictEqual', looseEqual: 'deepEqual', looseNotEqual: 'notDeepEqual', strictNotEqual: 'notStrictEqual' }`
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc