move source into src dir
This commit is contained in:
parent
d5ab4d4b18
commit
998d18ae84
@ -2,7 +2,7 @@
|
|||||||
"name": "node-fetch-cache",
|
"name": "node-fetch-cache",
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"description": "node-fetch with a persistent cache.",
|
"description": "node-fetch with a persistent cache.",
|
||||||
"main": "index.js",
|
"main": "src/index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "mocha --timeout 10000 --exit",
|
"test": "mocha --timeout 10000 --exit",
|
||||||
|
@ -7,7 +7,7 @@ import rimraf from 'rimraf';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import { URLSearchParams } from 'url';
|
import { URLSearchParams } from 'url';
|
||||||
import standardFetch from 'node-fetch';
|
import standardFetch from 'node-fetch';
|
||||||
import FetchCache, { MemoryCache, FileSystemCache } from '../index.js';
|
import FetchCache, { MemoryCache, FileSystemCache } from '../src/index.js';
|
||||||
import { Agent } from 'http';
|
import { Agent } from 'http';
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
@ -260,7 +260,7 @@ describe('Cache tests', function() {
|
|||||||
|
|
||||||
it('Gives different read streams different cache keys', async function() {
|
it('Gives different read streams different cache keys', async function() {
|
||||||
const s1 = fs.createReadStream(path.join(__dirname, 'expected_png.png'));
|
const s1 = fs.createReadStream(path.join(__dirname, 'expected_png.png'));
|
||||||
const s2 = fs.createReadStream(path.join(__dirname, '..', 'index.js'));
|
const s2 = fs.createReadStream(path.join(__dirname, '..', 'src', 'index.js'));
|
||||||
|
|
||||||
res = await cachedFetch(TWO_HUNDRED_URL, post(s1));
|
res = await cachedFetch(TWO_HUNDRED_URL, post(s1));
|
||||||
assert.strictEqual(res.fromCache, false);
|
assert.strictEqual(res.fromCache, false);
|
||||||
|
Reference in New Issue
Block a user