1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Move testing utilities to separate package

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2023-03-02 09:40:26 -05:00
parent 13673eaac4
commit 4fe106610a
10 changed files with 40 additions and 0 deletions

View File

@ -62,6 +62,7 @@ export const getOverrideFsWithFakes = () => {
ensureDirSync,
createReadStream: root.createReadStream as any,
stat: root.promises.stat as any,
unlink: root.promises.unlink,
}));
};
};

View File

@ -0,0 +1,3 @@
# @k8slens/test-utils
This package contains many useful utilities for testing.

View File

@ -0,0 +1,3 @@
export * from "./src/flush-promises";
export * from "./src/get-promise-status";
export * from "./src/use-fake-time";

View File

@ -0,0 +1,2 @@
module.exports =
require("@k8slens/jest").monorepoPackageConfig(__dirname).configForReact;

View File

@ -0,0 +1,27 @@
{
"name": "@k8slens/test-utils",
"version": "1.0.0",
"description": "A collection of utilities for testing",
"type": "commonjs",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
},
"private": false,
"files": [
"dist"
],
"author": {
"name": "OpenLens Authors",
"email": "info@k8slens.dev"
},
"license": "MIT",
"homepage": "https://github.com/lensapp/lens",
"scripts": {
"build": "webpack",
"dev": "webpack --mode=development --watch",
"test": "jest --coverage --runInBand"
}
}

View File

@ -0,0 +1,3 @@
{
"extends": "@k8slens/typescript/config/base.json"
}

View File

@ -0,0 +1 @@
module.exports = require("@k8slens/webpack").configForNode;