Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
berniegp committed Oct 20, 2024
1 parent 5e75e27 commit 77c6af2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions integration_tests/esm/index.js
Original file line number Diff line number Diff line change
@@ -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));
Expand All @@ -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!" }',
}],
Expand All @@ -25,7 +26,6 @@ async function integrationTest() {
const result = await functionToTest();
assert.equal(result.message, 'Success!');
} finally {
// Restore the original XMLHttpRequest
server.remove();
}
}
Expand Down

0 comments on commit 77c6af2

Please sign in to comment.