diff --git a/integration_tests/esm/index.js b/integration_tests/esm/index.js index 01b4055..16a60c6 100644 --- a/integration_tests/esm/index.js +++ b/integration_tests/esm/index.js @@ -1,8 +1,10 @@ import { assert } from 'node:assert'; +// eslint-disable-next-line import/no-unresolved import { newServer } from 'mock-xmlhttprequest'; function functionToTest() { return new Promise((resolve, reject) => { + // eslint-disable-next-line no-undef const xhr = new XMLHttpRequest(); xhr.open('GET', '/my/url'); xhr.onload = () => resolve(JSON.parse(xhr.response)); @@ -13,7 +15,6 @@ function functionToTest() { const server = newServer({ get: ['/my/url', { - // status: 200 is the default headers: { 'Content-Type': 'application/json' }, body: '{ "message": "Success!" }', }], @@ -25,7 +26,6 @@ async function integrationTest() { const result = await functionToTest(); assert.equal(result.message, 'Success!'); } finally { - // Restore the original XMLHttpRequest server.remove(); } }