/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/entail@3.0.1/src/lib.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
import*as assert from"./assert.js";import*as API from"./api.js";export*from"./api.js";import{report}from"./reporter.js";export{assert};const write=typeof process<"u"&&process.stdout?.write?.bind(process.stdout)||console.log;export async function*run(t,{bail:e}){for(const o of iterate(t))if(o.mode===SKIP)yield{skip:o};else{yield{test:o};let t=performance.now();try{await o.test(assert),yield{pass:{...o,duration:performance.now()-t}}}catch(s){const n=s;if(n.origin=o,yield{fail:{...o,duration:performance.now()-t,error:n}},e)return}}}const test=async(t,{bail:e=!1,writer:o={write:write}}={})=>{const s=report(run(t,{bail:e}));for(;;){const{done:t,value:e}=await s.next();if(t)return e;o.write(e)}};export default test;const SKIP_EXPORT=/^skipTest|skip_test|skip test|skip! test/,ONLY_EXPORT=/^onlyTest|only_test|only test|only! test/,TEST_EXPORT=/^test([_$ A-Z].*)*/;export const iterate=function*(t){let e=TEST;const o=[];for(const[s,n]of Object.entries(t))for(const t of iterateModule(n,[s]))e===ONLY?yield t.mode===ONLY?t:{...t,mode:SKIP}:t.mode===ONLY?(e=ONLY,yield*skip(o.splice(0)),yield t):o.push(t);yield*o};function*skip(t){for(const e of t)yield{...e,mode:SKIP}}function*iterateModule(t,e){const o=!0===t?.test?.skip?SKIP:!0===t?.test?.only?ONLY:null;for(const[s,n]of Object.entries(t)){const t=SKIP_EXPORT.test(s)?SKIP:ONLY_EXPORT.test(s)?o??ONLY:TEST_EXPORT.test(s)?o??TEST:null;t&&("function"==typeof n?yield{test:n,mode:t,at:e,name:s}:n&&"object"==typeof n&&(yield*iterateTestSuite(n,t,[...e,s])))}}const SKIP_MEMBER=/^skip[!_ ]/,ONLY_MEMBER=/^only[!_ ]/,SKIP="skip",ONLY="only",TEST="test";function*iterateTestSuite(t,e,o){const s=e===SKIP||!0===t?.skip?SKIP:!0===t?.only||e===ONLY?ONLY:void 0;for(const[e,n]of Object.entries(t)){const t=SKIP_MEMBER.test(e)?SKIP:ONLY_MEMBER.test(e)?s===SKIP?SKIP:ONLY:s??TEST;"function"==typeof n?yield{mode:t,test:n,at:o,name:e}:n&&"object"==typeof n&&(yield*iterateTestSuite(n,t,[...o,e]))}}const formatPath=(t,e)=>{const o=t.startsWith(e)?t.slice(e.length):t;return o.startsWith("/")||o.startsWith("\\")?o.slice(1):o};export const playwrightTestRunner={options:{},compileRuntime:({cwd:t},e)=>`\nconst tests = Object.fromEntries([\n  ${e.map((e=>`['${formatPath(e,t)}', await import('${e}')]`)).join(",\n    ")}\n])\nconst entail = await import('entail')\n\nconst result = await entail.default(tests)\nprocess.exit(result.failed.length > 0 ? 1 : 0)\n`};
//# sourceMappingURL=/sm/464af61cb75382d9809183798a13c05509baa28585de3953343a47c2e61c7605.map