Skip to content

Commit

Permalink
test: fix incorrect requires
Browse files Browse the repository at this point in the history
Signed-off-by: Tierney Cyren <[email protected]>
  • Loading branch information
bnb committed Nov 8, 2024
1 parent 4ab00a8 commit f7d2c47
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fetchindex/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const { deepStrictEqual } = require('node:assert');
const { describe, it } = require('node:test');
const { fetch: undiciFetch } = require('undici');
const { DateTime } = require('luxon');
const nodevu = require('../index');
const versions = require('../index');
const nodevu = require('@nodevu/core');
const fetchindex = require('../index');
const optionsParser = require('../../core/util/prod/optionsParser');

// checks that verify the result of data returned
Expand Down Expand Up @@ -31,29 +31,29 @@ const options = {

describe('under normal condiditons, versions should work', async () => {
it('should work with default options', async () => {
const data = await versions(options);
const data = await fetchindex(options);
check(data);
});

it('should work with Undici fetch', async () => {
options.fetch = undiciFetch;
const data = await versions(options);
const data = await fetchindex(options);
check(data);
});
});

describe('versions should work with optionsParser', async () => {
it('should work with the default output of optionsParser', async () => {
const parsedOptions = optionsParser({});
const data = await versions(parsedOptions);
const data = await fetchindex(parsedOptions);
check(data);
});

it('should work with a different fetch pased to optionsParser', async () => {
const parsedOptions = optionsParser({
fetch: undiciFetch,
});
const data = await versions(parsedOptions);
const data = await fetchindex(parsedOptions);
check(data);
});
});

0 comments on commit f7d2c47

Please sign in to comment.