add simply library tests + fix umd and cjs mixup bug + simplify library paths

This commit is contained in:
mrjvs
2023-09-06 21:57:57 +02:00
parent 7b9b25acab
commit 764986abff
7 changed files with 22 additions and 9 deletions

1
test/README.md Normal file
View File

@@ -0,0 +1 @@
This folder is only for simple library usage tests in `CJS` and `UMD`. Real unit tests are at `src/__test__`.

5
test/index.js Normal file
View File

@@ -0,0 +1,5 @@
const { makeProviders, makeStandardFetcher } = require('../lib/index.umd.js');
const providers = makeProviders({
fetcher: makeStandardFetcher(fetch),
});

5
test/index.mjs Normal file
View File

@@ -0,0 +1,5 @@
import { makeProviders, makeStandardFetcher } from '../lib/index.mjs';
const providers = makeProviders({
fetcher: makeStandardFetcher(fetch),
});

6
test/package.json Normal file
View File

@@ -0,0 +1,6 @@
{
"scripts": {
"start:umd": "node index.mjs",
"start:cjs": "node index.js"
}
}