babel-plugin-tester
Advanced tools
Comparing version 9.0.0 to 9.0.1
@@ -208,3 +208,3 @@ "use strict"; | ||
} else { | ||
_assert.default.equal(result.trim(), code.trim(), 'Expected output to not change, but it did'); | ||
_assert.default.equal(result.trim(), fixLineEndings(code, endOfLine), 'Expected output to not change, but it did'); | ||
} | ||
@@ -246,4 +246,4 @@ } | ||
function fixLineEndings(code, endOfLine, input) { | ||
return code.replace(/\r?\n/g, getReplacement()); | ||
function fixLineEndings(string, endOfLine, input = string) { | ||
return String(string).replace(/\r?\n/g, getReplacement()).trim(); | ||
@@ -367,3 +367,3 @@ function getReplacement() { | ||
_assert.default.equal(actual.trim(), output.trim(), `actual output does not match ${fixtureOutputName}${ext}`); | ||
_assert.default.equal(actual.trim(), fixLineEndings(output, endOfLine), `actual output does not match ${fixtureOutputName}${ext}`); | ||
}); | ||
@@ -370,0 +370,0 @@ }); |
{ | ||
"name": "babel-plugin-tester", | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"description": "Utilities for testing babel plugins", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -17,3 +17,3 @@ <div> | ||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --> | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-13-orange.svg?style=flat-square)](#contributors-) | ||
[![All Contributors](https://img.shields.io/badge/all_contributors-14-orange.svg?style=flat-square)](#contributors-) | ||
<!-- ALL-CONTRIBUTORS-BADGE:END --> | ||
@@ -577,2 +577,3 @@ [![PRs Welcome][prs-badge]][prs] | ||
<td align="center"><a href="https://michaeldeboey.be"><img src="https://avatars3.githubusercontent.com/u/6643991?v=4" width="100px;" alt=""/><br /><sub><b>MichaΓ«l De Boey</b></sub></a><br /><a href="https://github.com/babel-utils/babel-plugin-tester/commits?author=MichaelDeBoey" title="Code">π»</a></td> | ||
<td align="center"><a href="https://github.com/yuyaryshev"><img src="https://avatars0.githubusercontent.com/u/18558421?v=4" width="100px;" alt=""/><br /><sub><b>yuyaryshev</b></sub></a><br /><a href="https://github.com/babel-utils/babel-plugin-tester/commits?author=yuyaryshev" title="Code">π»</a></td> | ||
</tr> | ||
@@ -579,0 +580,0 @@ </table> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46956
617