Approval Tests implementation in NodeJS
There should be no visible changes from this release ¯_(ツ)_/¯ But all of the source files have been upgraded to typescript.
Normally I would set this as a patch release, but I making it a major version as I am concerned about changes to have javascript and typescript handle exports.
I have had to use the following a bit
var a = require("a")
⇓
import {a} from "a"
or
import * as a from "a"
For the future, we have set "importsNotUsedAsValues" to "error" to prevent future recurrences.
This helps other packages that have this value set not error-out because they are using Approvals.
Fixes #150 the 'v' in v6.2.3 caused trouble with npm
Added check when running JestApprovals in angular
This fixes the following warnings in v6.2.0
$ eslint ./src --fix && eslint ./tests --fix && tsc --noEmit --pretty && svelte-check
node_modules/approvals/lib/Core/Options.ts:2:1 - error TS1371: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.
2 import {Namer} from "../Namer";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
node_modules/approvals/lib/Providers/Jest/JestApprovals.ts:3:1 - error TS6133: 'getJestNamer' is declared but its value is never read.
3 import {getJestNamer} from "./JestNamer";
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 2 errors in 2 files.
Errors Files
1 node_modules/approvals/lib/Core/Options.ts:2
1 node_modules/approvals/lib/Providers/Jest/JestApprovals.ts:3
JestReporter
: see docs
lib/Utilities/Printers.ts
lib/Providers/Jest/CombinationApprovals.ts
Documentation coming soon.
There was a type in the name
Added support for the default date output of date.toUTCString()
Allows
const digits = [1,2,3,4,5];
verifyAll("Squared", digits, d => `${d} => ${d*d}` );
to produce
Squared
1 => 1
2 => 4
3 => 9
4 => 16
5 => 25