@joystick.js/test-canary
Advanced tools
Comparing version 0.0.0-canary.16 to 0.0.0-canary.17
@@ -1,1 +0,1 @@ | ||
import n from"fs";import c from"../../lib/CLILog.js";const a=async(o="",s={})=>{const t=import(`${o}?update=${Date.now()}`);return console.log({path:o,options:s,contents:t}),t?.default&&s?.default?t.default:t};var u=async(o="",s={})=>{const e=o?.charAt(0)==="/"?o.substring(1,o.length):o,t=`${process.cwd()}/.joystick/build/${e}`;return n.existsSync(t)?a(t,s):(c(`[test.load] Path at ${t} not found.`,{level:"warning",docs:"https://cheatcode.co/docs/joystick/test/load"}),null)};export{u as default}; | ||
import n from"fs";import c from"../../lib/CLILog.js";const a=async(o="",s={})=>{const t=await import(`${o}?update=${Date.now()}`);return console.log({path:o,options:s,contents:t}),t?.default&&s?.default?t.default:t};var u=async(o="",s={})=>{const e=o?.charAt(0)==="/"?o.substring(1,o.length):o,t=`${process.cwd()}/.joystick/build/${e}`;return n.existsSync(t)?a(t,s):(c(`[test.load] Path at ${t} not found.`,{level:"warning",docs:"https://cheatcode.co/docs/joystick/test/load"}),null)};export{u as default}; |
{ | ||
"name": "@joystick.js/test-canary", | ||
"type": "module", | ||
"version": "0.0.0-canary.16", | ||
"version": "0.0.0-canary.17", | ||
"description": "Isomorphic testing framework for the Joystick JavaScript framework.", | ||
@@ -6,0 +6,0 @@ "main": "dist/index.js", |
@@ -6,3 +6,3 @@ import fs from 'fs'; | ||
const modulePath = `${path}?update=${Date.now()}` | ||
const contents = import(modulePath); | ||
const contents = await import(modulePath); | ||
console.log({ path, options, contents }); | ||
@@ -9,0 +9,0 @@ return (contents?.default && options?.default) ? contents.default : contents; |
37504