You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import ajax from '../../src/sandbox-controller/ajax/index.js';
const { fetch } = ajax;
/**
* This test suite verfies the the custom {Fetch} interface. (Actual network fetching will be covered in an integration test.)
*/
describe('Ajax', () => {
test('Should be able to take a configuration for an HTTP request', async () => {
const data = await fetch({ url: 'http://httpbin.org/json' });
console.log({ data });
expect(data).toBeTruthy();
});
});
fails with the error messsage:
/workspaces/sandbox-poc/node_modules/node-fetch/src/index.js:9
import http from 'node:http';
^^^^^^
SyntaxError: Cannot use import statement outside a module
The text was updated successfully, but these errors were encountered:
The following unit test:
fails with the error messsage:
The text was updated successfully, but these errors were encountered: