refactor: do better at some point
This commit is contained in:
parent
735144df55
commit
b9e3ac433b
|
@ -1,6 +0,0 @@
|
|||
export default class First {
|
||||
static gathered(id, key) {
|
||||
this.id = id;
|
||||
this.key = key;
|
||||
}
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
export default class Second {
|
||||
static gathered(id, key) {
|
||||
this.id = id;
|
||||
this.key = key;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
});
|
Loading…
Reference in New Issue
Block a user