refactor: do better at some point

This commit is contained in:
cha0s 2024-07-22 18:43:01 -05:00
parent 735144df55
commit b9e3ac433b
3 changed files with 0 additions and 29 deletions

View File

@ -1,6 +0,0 @@
export default class First {
static gathered(id, key) {
this.id = id;
this.key = key;
}
}

View File

@ -1,6 +0,0 @@
export default class Second {
static gathered(id, key) {
this.id = id;
this.key = key;
}
}

View File

@ -1,17 +0,0 @@
import {expect, test} from 'vitest';
import gather from './gather.js';
import First from './gather-test/first.js';
import Second from './gather-test/second.js';
test('gathers', async () => {
const Gathered = gather(
import.meta.glob('./gather-test/*.js', {eager: true, import: 'default'}),
{mapperForPath: (path) => path.replace(/\.\/gather-test\/(.*)\.js/, '$1')},
);
expect(Gathered.First)
.to.equal(First);
expect(Gathered.Second)
.to.equal(Second);
});