diff --git a/packages/frontend-test-utils/.eslintrc.js b/packages/frontend-test-utils/.eslintrc.js new file mode 100644 index 0000000000..e2a53a6ad2 --- /dev/null +++ b/packages/frontend-test-utils/.eslintrc.js @@ -0,0 +1 @@ +module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/packages/frontend-test-utils/README.md b/packages/frontend-test-utils/README.md new file mode 100644 index 0000000000..b3325ac192 --- /dev/null +++ b/packages/frontend-test-utils/README.md @@ -0,0 +1,12 @@ +# @backstage/frontend-test-utils + +_This package was created through the Backstage CLI_. + +## Installation + +Install the package via Yarn: + +```sh +cd # if within a monorepo +yarn add @backstage/frontend-test-utils +``` diff --git a/packages/frontend-test-utils/package.json b/packages/frontend-test-utils/package.json new file mode 100644 index 0000000000..c7ce21161e --- /dev/null +++ b/packages/frontend-test-utils/package.json @@ -0,0 +1,32 @@ +{ + "name": "@backstage/frontend-test-utils", + "version": "0.0.0", + "main": "src/index.ts", + "types": "src/index.ts", + "license": "Apache-2.0", + "publishConfig": { + "access": "public", + "main": "dist/index.esm.js", + "types": "dist/index.d.ts" + }, + "backstage": { + "role": "web-library" + }, + "sideEffects": false, + "scripts": { + "start": "backstage-cli package start", + "build": "backstage-cli package build", + "lint": "backstage-cli package lint", + "test": "backstage-cli package test", + "clean": "backstage-cli package clean", + "prepack": "backstage-cli package prepack", + "postpack": "backstage-cli package postpack" + }, + "devDependencies": { + "@backstage/cli": "workspace:^", + "@testing-library/jest-dom": "^6.0.0" + }, + "files": [ + "dist" + ] +} diff --git a/packages/frontend-test-utils/src/index.ts b/packages/frontend-test-utils/src/index.ts new file mode 100644 index 0000000000..aa70772592 --- /dev/null +++ b/packages/frontend-test-utils/src/index.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export {}; diff --git a/packages/frontend-test-utils/src/setupTests.ts b/packages/frontend-test-utils/src/setupTests.ts new file mode 100644 index 0000000000..c30f1d15cb --- /dev/null +++ b/packages/frontend-test-utils/src/setupTests.ts @@ -0,0 +1,17 @@ +/* + * Copyright 2023 The Backstage Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import '@testing-library/jest-dom'; diff --git a/yarn.lock b/yarn.lock index 53e1959f8b..a2f0d1b8fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4345,6 +4345,15 @@ __metadata: languageName: unknown linkType: soft +"@backstage/frontend-test-utils@workspace:packages/frontend-test-utils": + version: 0.0.0-use.local + resolution: "@backstage/frontend-test-utils@workspace:packages/frontend-test-utils" + dependencies: + "@backstage/cli": "workspace:^" + "@testing-library/jest-dom": ^6.0.0 + languageName: unknown + linkType: soft + "@backstage/integration-aws-node@workspace:^, @backstage/integration-aws-node@workspace:packages/integration-aws-node": version: 0.0.0-use.local resolution: "@backstage/integration-aws-node@workspace:packages/integration-aws-node"