@wordpress/jest-console 5.2.0 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/matchers.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/jest-console/src/matchers.js"],"names":["createToHaveBeenCalledMatcher","matcherName","methodName","received","spy","calls","mock","pass","length","message","getMockName","map","printReceived","assertionsNumber","createToHaveBeenCalledWith","expected","objects","expect","extend","supportedMatchers","result","matcherNameWith"],"mappings":";;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,6BAA6B,
|
|
1
|
+
{"version":3,"sources":["@wordpress/jest-console/src/matchers.js"],"names":["createToHaveBeenCalledMatcher","matcherName","methodName","received","spy","calls","mock","pass","length","message","getMockName","map","printReceived","assertionsNumber","createToHaveBeenCalledWith","expected","objects","expect","extend","supportedMatchers","result","matcherNameWith"],"mappings":";;;;AAGA;;AACA;;AAKA;;AATA;AACA;AACA;;AAIA;AACA;AACA;AAGA,MAAMA,6BAA6B,GAClC,CAAEC,WAAF,EAAeC,UAAf,KAAiCC,QAAF,IAAgB;AAC9C,QAAMC,GAAG,GAAGD,QAAQ,CAAED,UAAF,CAApB;AACA,QAAMG,KAAK,GAAGD,GAAG,CAACE,IAAJ,CAASD,KAAvB;AACA,QAAME,IAAI,GAAGF,KAAK,CAACG,MAAN,GAAe,CAA5B;AACA,QAAMC,OAAO,GAAGF,IAAI,GACjB,MACA,mCAAc,OAAON,WAAa,EAAlC,EAAqCG,GAAG,CAACM,WAAJ,EAArC,IACA,MADA,GAEA,mEAFA,GAGAL,KAAK,CAACM,GAAN,CAAWC,+BAAX,CALiB,GAMjB,MACA,mCAAaX,WAAb,EAA0BG,GAAG,CAACM,WAAJ,EAA1B,IACA,MADA,GAEA,sCATH;AAWAN,EAAAA,GAAG,CAACS,gBAAJ,IAAwB,CAAxB;AAEA,SAAO;AACNJ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,CADD","sourcesContent":["/**\n * External dependencies\n */\nimport { matcherHint, printExpected, printReceived } from 'jest-matcher-utils';\nimport { isEqual, reduce, some } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport supportedMatchers from './supported-matchers';\n\nconst createToHaveBeenCalledMatcher =\n\t( matcherName, methodName ) => ( received ) => {\n\t\tconst spy = received[ methodName ];\n\t\tconst calls = spy.mock.calls;\n\t\tconst pass = calls.length > 0;\n\t\tconst message = pass\n\t\t\t? () =>\n\t\t\t\t\tmatcherHint( `.not${ matcherName }`, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function not to be called but it was called with:\\n' +\n\t\t\t\t\tcalls.map( printReceived )\n\t\t\t: () =>\n\t\t\t\t\tmatcherHint( matcherName, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function to be called.';\n\n\t\tspy.assertionsNumber += 1;\n\n\t\treturn {\n\t\t\tmessage,\n\t\t\tpass,\n\t\t};\n\t};\n\nconst createToHaveBeenCalledWith =\n\t( matcherName, methodName ) =>\n\t( received, ...expected ) => {\n\t\tconst spy = received[ methodName ];\n\t\tconst calls = spy.mock.calls;\n\t\tconst pass = some( calls, ( objects ) => isEqual( objects, expected ) );\n\t\tconst message = pass\n\t\t\t? () =>\n\t\t\t\t\tmatcherHint( `.not${ matcherName }`, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function not to be called with:\\n' +\n\t\t\t\t\tprintExpected( expected )\n\t\t\t: () =>\n\t\t\t\t\tmatcherHint( matcherName, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function to be called with:\\n' +\n\t\t\t\t\tprintExpected( expected ) +\n\t\t\t\t\t'\\n' +\n\t\t\t\t\t'but it was called with:\\n' +\n\t\t\t\t\tcalls.map( printReceived );\n\n\t\tspy.assertionsNumber += 1;\n\n\t\treturn {\n\t\t\tmessage,\n\t\t\tpass,\n\t\t};\n\t};\n\nexpect.extend(\n\treduce(\n\t\tsupportedMatchers,\n\t\t( result, matcherName, methodName ) => {\n\t\t\tconst matcherNameWith = `${ matcherName }With`;\n\n\t\t\treturn {\n\t\t\t\t...result,\n\t\t\t\t[ matcherName ]: createToHaveBeenCalledMatcher(\n\t\t\t\t\t`.${ matcherName }`,\n\t\t\t\t\tmethodName\n\t\t\t\t),\n\t\t\t\t[ matcherNameWith ]: createToHaveBeenCalledWith(\n\t\t\t\t\t`.${ matcherNameWith }`,\n\t\t\t\t\tmethodName\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t{}\n\t)\n);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@wordpress/jest-console/src/matchers.js"],"names":["matcherHint","printExpected","printReceived","isEqual","reduce","some","supportedMatchers","createToHaveBeenCalledMatcher","matcherName","methodName","received","spy","calls","mock","pass","length","message","getMockName","map","assertionsNumber","createToHaveBeenCalledWith","expected","objects","expect","extend","result","matcherNameWith"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,aAAtB,EAAqCC,aAArC,QAA0D,oBAA1D;AACA,SAASC,OAAT,EAAkBC,MAAlB,EAA0BC,IAA1B,QAAsC,QAAtC;AAEA;AACA;AACA;;AACA,OAAOC,iBAAP,MAA8B,sBAA9B;;AAEA,MAAMC,6BAA6B,
|
|
1
|
+
{"version":3,"sources":["@wordpress/jest-console/src/matchers.js"],"names":["matcherHint","printExpected","printReceived","isEqual","reduce","some","supportedMatchers","createToHaveBeenCalledMatcher","matcherName","methodName","received","spy","calls","mock","pass","length","message","getMockName","map","assertionsNumber","createToHaveBeenCalledWith","expected","objects","expect","extend","result","matcherNameWith"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,WAAT,EAAsBC,aAAtB,EAAqCC,aAArC,QAA0D,oBAA1D;AACA,SAASC,OAAT,EAAkBC,MAAlB,EAA0BC,IAA1B,QAAsC,QAAtC;AAE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WAAW,CAAEQ,WAAF,EAAeG,GAAG,CAACM,WAAJ,EAAf,CAAX,GACA,MADA,GAEA,6CAFA,GAGAhB,aAAa,CAAEoB,QAAF,CAHb,GAIA,IAJA,GAKA,2BALA,GAMAT,KAAK,CAACM,GAAN,CAAWhB,aAAX,CAbH;AAeAS,EAAAA,GAAG,CAACQ,gBAAJ,IAAwB,CAAxB;AAEA,SAAO;AACNH,IAAAA,OADM;AAENF,IAAAA;AAFM,GAAP;AAIA,CA3BF;;AA6BAS,MAAM,CAACC,MAAP,CACCpB,MAAM,CACLE,iBADK,EAEL,CAAEmB,MAAF,EAAUjB,WAAV,EAAuBC,UAAvB,KAAuC;AACtC,QAAMiB,eAAe,GAAI,GAAGlB,WAAa,MAAzC;AAEA,SAAO,EACN,GAAGiB,MADG;AAEN,KAAEjB,WAAF,GAAiBD,6BAA6B,CAC5C,IAAIC,WAAa,EAD2B,EAE7CC,UAF6C,CAFxC;AAMN,KAAEiB,eAAF,GAAqBN,0BAA0B,CAC7C,IAAIM,eAAiB,EADwB,EAE9CjB,UAF8C;AANzC,GAAP;AAWA,CAhBI,EAiBL,EAjBK,CADP","sourcesContent":["/**\n * External dependencies\n */\nimport { matcherHint, printExpected, printReceived } from 'jest-matcher-utils';\nimport { isEqual, reduce, some } from 'lodash';\n\n/**\n * Internal dependencies\n */\nimport supportedMatchers from './supported-matchers';\n\nconst createToHaveBeenCalledMatcher =\n\t( matcherName, methodName ) => ( received ) => {\n\t\tconst spy = received[ methodName ];\n\t\tconst calls = spy.mock.calls;\n\t\tconst pass = calls.length > 0;\n\t\tconst message = pass\n\t\t\t? () =>\n\t\t\t\t\tmatcherHint( `.not${ matcherName }`, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function not to be called but it was called with:\\n' +\n\t\t\t\t\tcalls.map( printReceived )\n\t\t\t: () =>\n\t\t\t\t\tmatcherHint( matcherName, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function to be called.';\n\n\t\tspy.assertionsNumber += 1;\n\n\t\treturn {\n\t\t\tmessage,\n\t\t\tpass,\n\t\t};\n\t};\n\nconst createToHaveBeenCalledWith =\n\t( matcherName, methodName ) =>\n\t( received, ...expected ) => {\n\t\tconst spy = received[ methodName ];\n\t\tconst calls = spy.mock.calls;\n\t\tconst pass = some( calls, ( objects ) => isEqual( objects, expected ) );\n\t\tconst message = pass\n\t\t\t? () =>\n\t\t\t\t\tmatcherHint( `.not${ matcherName }`, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function not to be called with:\\n' +\n\t\t\t\t\tprintExpected( expected )\n\t\t\t: () =>\n\t\t\t\t\tmatcherHint( matcherName, spy.getMockName() ) +\n\t\t\t\t\t'\\n\\n' +\n\t\t\t\t\t'Expected mock function to be called with:\\n' +\n\t\t\t\t\tprintExpected( expected ) +\n\t\t\t\t\t'\\n' +\n\t\t\t\t\t'but it was called with:\\n' +\n\t\t\t\t\tcalls.map( printReceived );\n\n\t\tspy.assertionsNumber += 1;\n\n\t\treturn {\n\t\t\tmessage,\n\t\t\tpass,\n\t\t};\n\t};\n\nexpect.extend(\n\treduce(\n\t\tsupportedMatchers,\n\t\t( result, matcherName, methodName ) => {\n\t\t\tconst matcherNameWith = `${ matcherName }With`;\n\n\t\t\treturn {\n\t\t\t\t...result,\n\t\t\t\t[ matcherName ]: createToHaveBeenCalledMatcher(\n\t\t\t\t\t`.${ matcherName }`,\n\t\t\t\t\tmethodName\n\t\t\t\t),\n\t\t\t\t[ matcherNameWith ]: createToHaveBeenCalledWith(\n\t\t\t\t\t`.${ matcherNameWith }`,\n\t\t\t\t\tmethodName\n\t\t\t\t),\n\t\t\t};\n\t\t},\n\t\t{}\n\t)\n);\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wordpress/jest-console",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0",
|
|
4
4
|
"description": "Custom Jest matchers for the Console object.",
|
|
5
5
|
"author": "The WordPress Contributors",
|
|
6
6
|
"license": "GPL-2.0-or-later",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"publishConfig": {
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "48d5f37dfb52d2e77c8eeb662f9874cf141b8c6b"
|
|
46
46
|
}
|