Skip to content

chore: set up tests with mocha #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/code_health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,17 @@ jobs:
run: npm ci
- name: Run style check
run: npm run check

run-tests:
runs-on: ubuntu-latest
steps:
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
6 changes: 6 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,17 @@ import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
import eslintConfigPrettier from "eslint-config-prettier/flat";
import mochaPlugin from "eslint-plugin-mocha";

export default defineConfig([
{ files: ["src/**/*.ts"], plugins: { js }, extends: ["js/recommended"] },
{ files: ["src/**/*.ts"], languageOptions: { globals: globals.node } },
{
files: ["**/*.spec.ts"],
env: { mocha: true },
},
tseslint.configs.recommended,
eslintConfigPrettier,
globalIgnores(["node_modules", "dist"]),
mochaPlugin.configs.flat.recommended,
]);
Loading
Loading