Skip to content

Commit

Permalink
Tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
Jialecl committed Sep 16, 2024
1 parent e05c6b8 commit 6825887
Show file tree
Hide file tree
Showing 12 changed files with 2,229 additions and 2,472 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
- name: Install lib dependencies
run: npm install

- name: Serve test server
run: npx nx serve-test halstack-react-hal

- name: Test lib
run: npx nx test halstack-react-hal

- name: Stop json-server
run: kill $(lsof -t -i:3000)

- name: Build library
run: npx nx build halstack-react-hal

Expand Down
20 changes: 0 additions & 20 deletions lib/.babelrc

This file was deleted.

17 changes: 17 additions & 0 deletions lib/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
module.exports = {
presets: [
"@babel/preset-env",
[
"@babel/preset-react",
{
runtime: "automatic",
},
],
"@babel/preset-typescript",
],
plugins: [
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-transform-runtime",
],
};
14 changes: 8 additions & 6 deletions lib/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
/* eslint-disable */
export default {
displayName: 'halstack-react-hal',
preset: '../jest.preset.js',
moduleNameMapper: {
"\\.(css|less|scss|sass)$": "identity-obj-proxy",
},
displayName: "halstack-react-hal",
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nx/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nx/react/babel'] }],
"^.+\\.[tj]sx?$": "babel-jest",
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../coverage/halstack-react-hal',
moduleFileExtensions: ["ts", "tsx", "js", "jsx"],
coverageDirectory: "../coverage/halstack-react-hal",
testEnvironment: "jsdom",
};
Loading

0 comments on commit 6825887

Please sign in to comment.