Archived
1
0

feat: add cssStub to jest

This commit is contained in:
Joe Previte 2021-02-11 15:02:13 -07:00
parent 4f1f2c7171
commit 28b440a4ba
No known key found for this signature in database
GPG Key ID: 2C91590C6B742C24
2 changed files with 9 additions and 1 deletions

View File

@ -153,6 +153,9 @@
"<rootDir>/release-npm-package",
"<rootDir>/release-gcp",
"<rootDir>/release-images"
]
],
"moduleNameMapper": {
"^.+\\.(css|less)$": "<rootDir>/test/cssStub.ts"
}
}
}

5
test/cssStub.ts Normal file
View File

@ -0,0 +1,5 @@
// Note: this is needed for the register.test.ts
// This is because inside src/browser/register.ts
// we import CSS files, which Jest can't handle unless we tell it how to
// See: https://stackoverflow.com/a/39434579/3015595
module.exports = {}