Skip to content

Commit

Permalink
fix(index.mjs): ESM Module Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zaid450 committed Sep 26, 2020
1 parent b94db22 commit 58a0855
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion esm/index.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const QuizizzJS = require("../dist/index.js");

export const QuizizzJS;
export default QuizizzJS;

export const {
QuizizzClient,
Expand Down
15 changes: 15 additions & 0 deletions tests/esm.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import {expect} from("chai");
import {QuizizzClient} from("../dist/index");

const TestQuizID = "5e837297add6c6001b35496e";

describe("Quizizz.js", async () => {
const client = new QuizizzClient();
describe("Fetch Quiz", async () => {
const Quiz = await client.fetchQuiz(TestQuizID);
console.log(Quiz);
it("Valid ID", async () => {
return expect(Quiz.id).to.be.equal(TestQuizID);
});
});
});

0 comments on commit 58a0855

Please sign in to comment.