1
0
Fork 0
mirror of synced 2024-10-01 01:28:51 +13:00

Fix test for loading component library

This commit is contained in:
Andrew Kingston 2021-09-07 10:05:24 +01:00
parent 7064e80143
commit 3d68b39647

View file

@ -178,6 +178,7 @@ exports.getComponentLibraryManifest = async (appId, library) => {
// when testing in cypress and so on we need to get the package
// as the environment may not be fully fleshed out for dev or prod
if (env.isTest()) {
library = library.replace("standard-components", "client")
const lib = library.split("/")[1]
const path = require.resolve(library).split(lib)[0]
return require(join(path, lib, filename))