0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2025-02-02 20:55:35 -05:00
denoland-deno/tests/specs/npm/info_chalk_json/main.js
David Sherret 8cd9fa6aae
fix(node): correct resolution of dynamic import of esm from cjs (#27071)
Ensures a dynamic import in a CJS file will consider the referrer as an import for node resolution.

Also adds fixes (adds) support for `"resolution-mode"` in TypeScript.
2024-11-28 15:47:26 +01:00

12 lines
325 B
JavaScript

import chalk from "npm:chalk@4";
import { expect } from "npm:chai@4.3";
console.log(chalk.green("chalk cjs loads"));
const timeout = setTimeout(() => {}, 0);
expect(timeout).to.be.a("number");
clearTimeout(timeout);
const interval = setInterval(() => {}, 100);
expect(interval).to.be.a("number");
clearInterval(interval);