forked from biouno/uno-choice-plugin
-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Introduce tests for (some) javascript code
This extracts some code out to `Util.ts` and tests it using jest in `Util.test.ts`. `unochoice.js` has been renamed to `UnoChoice.es6` so we can synthesize `UnoChoice.js`.
- Loading branch information
Showing
12 changed files
with
5,000 additions
and
173 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
max_line_length = 160 | ||
tab_width = 4 | ||
ij_continuation_indent_size = 8 | ||
ij_formatter_off_tag = @formatter:off | ||
ij_formatter_on_tag = @formatter:on | ||
ij_formatter_tags_enabled = true | ||
ij_smart_tabs = false | ||
ij_visual_guides = none | ||
ij_wrap_on_typing = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
work/ | ||
.idea/ | ||
target/ | ||
test-output/ | ||
.idea/ | ||
.classpath | ||
.settings/ | ||
.project | ||
**/*~ | ||
*.iml | ||
work/ | ||
.idea/ | ||
target/ | ||
test-output/ | ||
.classpath | ||
.settings/ | ||
.project | ||
**/*~ | ||
*.iml | ||
node/ | ||
node_modules/ |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"license": "MIT", | ||
"version": "1.0.0", | ||
"description": "Active Choices Plugin UI", | ||
"name": "uno-choice", | ||
"private": true, | ||
"scripts": { | ||
"test": "jest --colors", | ||
"dev": "webpack --config webpack.config.js", | ||
"prod": "webpack --config webpack.config.js --mode=production", | ||
"build": "yarn prod", | ||
"mvntest": "yarn test", | ||
"mvnbuild": "yarn build" | ||
}, | ||
"devDependencies": { | ||
"@babel/cli": "^7.22.5", | ||
"@babel/core": "7.22.5", | ||
"@babel/preset-env": "^7.22.5", | ||
"@babel/preset-typescript": "^7.22.5", | ||
"@babel/preset-flow": "^7.22.5", | ||
"eslint": "8.43.0", | ||
"eslint-config-prettier": "8.8.0", | ||
"jest": "^29.5.0", | ||
"jest-environment-jsdom": "^29.5.0", | ||
"jest-junit": "^16.0.0", | ||
"jsdom": "^22.1.0", | ||
"prettier": "2.8.8", | ||
"ts-loader": "^9.4.3", | ||
"typescript": "^5.1.3", | ||
"webpack": "5.87.0", | ||
"webpack-cli": "5.1.4", | ||
"jquery": "^3.7.0", | ||
"@types/jquery": "^3.5.16" | ||
}, | ||
"dependencies": { | ||
}, | ||
"browserslist": [ | ||
"defaults", | ||
"not IE 11" | ||
], | ||
"packageManager": "[email protected]", | ||
"jest-junit": { | ||
"outputDirectory": "target/surefire-reports", | ||
"outputName": "TEST-Jest.xml", | ||
"ancestorSeparator": " › ", | ||
"classNameTemplate": "{classname}", | ||
"titleTemplate": "{title}", | ||
"usePathForSuiteName": "true" | ||
}, | ||
"babel": { | ||
"presets": [ | ||
["@babel/preset-env", {"targets": {"node": "current"}}], | ||
"@babel/preset-typescript", | ||
"@babel/preset-flow" | ||
] | ||
}, | ||
"jest": { | ||
"verbose": true, | ||
"testEnvironment": "jsdom", | ||
"reporters": [ | ||
"default", | ||
"jest-junit" | ||
], | ||
"testMatch": [ | ||
"<rootDir>/src/test/js/*.test.ts" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.