xenopomp-essentials 0.5.0-canary.2 → 0.5.0-canary.3

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vitest/index.mjs +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xenopomp-essentials",
3
- "version": "0.5.0-canary.2",
3
+ "version": "0.5.0-canary.3",
4
4
  "author": "XenoPOMP <101574433+XenoPOMP@users.noreply.github.com>",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/vitest/index.mjs CHANGED
@@ -1 +1 @@
1
- import{expect as c,vi as t}from"vitest";import{render as l,renderHook as r}from"@testing-library/react";import{blue as i,green as u,blueBright as d}from"ansi-colors";const a=e=>{c(()=>e()).not.toThrow()},f=(...e)=>{a(()=>l(...e))},h=(...e)=>{a(()=>r(...e))},m=e=>{t.stubEnv("CANONICAL_URL","http://localhost:4242"),t.stubEnv("IS_PRODUCTION","false"),e&&Object.entries(e).forEach(([n,o])=>t.stubEnv(n,o))},p=()=>{t.clearAllMocks(),t.resetAllMocks(),t.unstubAllEnvs(),t.unstubAllGlobals()},C=()=>{t.mock("next/navigation",()=>({useRouter:()=>({push(){}}),usePathname:()=>"/"}))},x={addBase:t.fn(),addComponents:t.fn(),addUtilities:t.fn(),addVariant:t.fn(),config:t.fn(),corePlugins:t.fn(),e:t.fn(),matchComponents:t.fn(),matchUtilities:t.fn(),matchVariant:t.fn(),theme:t.fn()};class b{_executionContext;constructor(n){this._executionContext=n}call(...n){console.debug(`${i(`[${this._executionContext}]`)} ${u(`Custom spy is called with these args: ${d(n.map(o=>`${o}`).join(", "))}`)}`)}}function g(e){const n=new b(e),o=t.spyOn(n,"call");return{expectToBeCalled:(...s)=>c(o).toHaveBeenCalledWith(s),expectToBeNotCalled:(...s)=>c(o).not.toHaveBeenCalledWith(s),spy:o,callSpy:(...s)=>n.call(s)}}export{h as assertHookRendering,a as assertNotThrowing,f as assertRendering,p as clearMocks,m as mockEnv,C as mockRouter,g as spyFactory,x as twApiMock};
1
+ import{expect as c,vi as t}from"vitest";import{render as r,renderHook as i}from"@testing-library/react";import a from"ansi-colors";const l=e=>{c(()=>e()).not.toThrow()},u=(...e)=>{l(()=>r(...e))},d=(...e)=>{l(()=>i(...e))},f=e=>{t.stubEnv("CANONICAL_URL","http://localhost:4242"),t.stubEnv("IS_PRODUCTION","false"),e&&Object.entries(e).forEach(([n,o])=>t.stubEnv(n,o))},h=()=>{t.clearAllMocks(),t.resetAllMocks(),t.unstubAllEnvs(),t.unstubAllGlobals()},m=()=>{t.mock("next/navigation",()=>({useRouter:()=>({push(){}}),usePathname:()=>"/"}))},p={addBase:t.fn(),addComponents:t.fn(),addUtilities:t.fn(),addVariant:t.fn(),config:t.fn(),corePlugins:t.fn(),e:t.fn(),matchComponents:t.fn(),matchUtilities:t.fn(),matchVariant:t.fn(),theme:t.fn()};class C{_executionContext;constructor(n){this._executionContext=n}call(...n){console.debug(`${a.blue(`[${this._executionContext}]`)} ${a.green(`Custom spy is called with these args: ${a.blueBright(n.map(o=>`${o}`).join(", "))}`)}`)}}function x(e){const n=new C(e),o=t.spyOn(n,"call");return{expectToBeCalled:(...s)=>c(o).toHaveBeenCalledWith(s),expectToBeNotCalled:(...s)=>c(o).not.toHaveBeenCalledWith(s),spy:o,callSpy:(...s)=>n.call(s)}}export{d as assertHookRendering,l as assertNotThrowing,u as assertRendering,h as clearMocks,f as mockEnv,m as mockRouter,x as spyFactory,p as twApiMock};