From b9e3ac433b82458df432a378b94daf96509b7f5e Mon Sep 17 00:00:00 2001 From: cha0s Date: Mon, 22 Jul 2024 18:43:01 -0500 Subject: [PATCH] refactor: do better at some point --- app/util/gather-test/first.js | 6 ------ app/util/gather-test/second.js | 6 ------ app/util/gather.test.js | 17 ----------------- 3 files changed, 29 deletions(-) delete mode 100644 app/util/gather-test/first.js delete mode 100644 app/util/gather-test/second.js delete mode 100644 app/util/gather.test.js diff --git a/app/util/gather-test/first.js b/app/util/gather-test/first.js deleted file mode 100644 index 7b2d012..0000000 --- a/app/util/gather-test/first.js +++ /dev/null @@ -1,6 +0,0 @@ -export default class First { - static gathered(id, key) { - this.id = id; - this.key = key; - } -} diff --git a/app/util/gather-test/second.js b/app/util/gather-test/second.js deleted file mode 100644 index 1596d86..0000000 --- a/app/util/gather-test/second.js +++ /dev/null @@ -1,6 +0,0 @@ -export default class Second { - static gathered(id, key) { - this.id = id; - this.key = key; - } -} diff --git a/app/util/gather.test.js b/app/util/gather.test.js deleted file mode 100644 index c7bd3db..0000000 --- a/app/util/gather.test.js +++ /dev/null @@ -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); -});