Skip to content

Commit

Permalink
chore: move regexs test file to src folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sheerlox committed Nov 18, 2023
1 parent 7600ce0 commit b6a5e4d
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"ignorePatterns": ["coverage"],
"overrides": [
{
"files": ["tests/**/*.js"],
"files": ["tests/**/*.js", "lib/**/*.spec.js"],
"plugins": ["jest"],
"extends": ["plugin:jest/recommended", "plugin:jest/style"],
"rules": {
Expand Down
6 changes: 6 additions & 0 deletions jest.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"collectCoverage": true,
"collectCoverageFrom": [
"**/*.{js,jsx}",
"!tests/fixtures/**",
"!**/node_modules/**",
"!**/coverage/**"
],
"coverageThreshold": {
"global": {
"statements": 100,
Expand Down
7 changes: 5 additions & 2 deletions tests/regexs.test.js → lib/helpers/regexs.spec.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
import {
invalidSemVers,
validSemVers,
} from "../../tests/fixtures/regexs.fixture";
import {
allVersionRegexs,
attributeVersionRegex,
regularVersionRegex,
semVerRegex,
} from "../lib/helpers/regexs";
import { invalidSemVers, validSemVers } from "./fixtures/regexs.fixture";
} from "./regexs";

describe("semVerRegex", () => {
it("should match valid values", () => {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@
"node": ">=16.3.0"
},
"files": [
"lib"
"lib",
"!lib/**/*.spec.js"
],
"keywords": [
"hex",
Expand Down

0 comments on commit b6a5e4d

Please sign in to comment.