Loading existing HTML file with JSDOM for frontend unit testing
问题 I'm new to unit testing, and I'm aware my tests may not be valuable or following a specific best practice, but I'm focused on getting this working, which will allow me to test my frontend code using JSDOM. const { JSDOM } = require('jsdom'); const { describe, it, beforeEach } = require('mocha'); const { expect } = require('chai'); let checkboxes; const options = { contentType: 'text/html', }; describe('component.js', () => { beforeEach(() => { JSDOM.fromFile('/Users/johnsoct/Dropbox