mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: Consolidate infrastructure of webpack to ts to make it scriptable
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi> Signed-off-by: Iku-turso <mikko.aspiala@gmail.com> Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
1 parent
f2f6cc500c
commit
9a4b02becb
24 files changed
+230
-190
No files matched your search
-3
@@ -1,3 +0,0 @@
|
||||
const toModuleMatcherRegExp = x => new RegExp(`^${x}(/.*)*$`);
|
||||
|
||||
module.exports = { toModuleMatcherRegExp };
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import { toModuleMatcherRegExp } from "./to-module-matcher-reg-exp";
|
||||
|
||||
describe('to-module-matcher-reg-exp', () => {
|
||||
let regExp;
|
||||
let regExp: RegExp;
|
||||
|
||||
beforeEach(() => {
|
||||
regExp = toModuleMatcherRegExp("some-package");
|
||||
@@ -10,7 +10,7 @@ describe('to-module-matcher-reg-exp', () => {
|
||||
it('given exactly matching package, matches', () => {
|
||||
const targetString = 'some-package';
|
||||
|
||||
const [match] = targetString.match(regExp);
|
||||
const [match] = targetString.match(regExp)!;
|
||||
|
||||
expect(match).toBeTruthy()
|
||||
});
|
||||
@@ -18,7 +18,7 @@ describe('to-module-matcher-reg-exp', () => {
|
||||
it('given matching package with entrypoint, matches', () => {
|
||||
const targetString = 'some-package/some-entrypoint';
|
||||
|
||||
const [match] = targetString.match(regExp);
|
||||
const [match] = targetString.match(regExp)!;
|
||||
|
||||
expect(match).toBeTruthy()
|
||||
});
|
||||
@@ -26,7 +26,7 @@ describe('to-module-matcher-reg-exp', () => {
|
||||
it('given matching package with directory, matches', () => {
|
||||
const targetString = 'some-package/some-directory/some-other-directory';
|
||||
|
||||
const [match] = targetString.match(regExp);
|
||||
const [match] = targetString.match(regExp)!;
|
||||
|
||||
expect(match).toBeTruthy()
|
||||
});
|
||||
+1
@@ -0,0 +1 @@
|
||||
export const toModuleMatcherRegExp = (x: string) => new RegExp(`^${x}(/.*)*$`);
|
||||
Reference in new issue
Block a user