Skip to content

Commit

Permalink
Chai is now consumable as ES module
Browse files Browse the repository at this point in the history
Changed the test file to .mjs and made required changes to keep existing syntax
  • Loading branch information
exsilium committed Dec 29, 2023
1 parent 95d3d41 commit e66b371
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/test-local.js → test/test-local.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@
"use server";
"use mocha";

var expect = require('chai').expect;
import { expect } from 'chai';

import path from 'path';
import { fileURLToPath } from 'url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

import { createRequire } from "module";
const require = createRequire(import.meta.url);

describe('vfs-local', function () {

Expand Down

0 comments on commit e66b371

Please sign in to comment.