Merge pull request #7 from Ishadijcks/main

Initialize jest
This commit is contained in:
Anthony Lawn 2022-06-23 11:24:02 -05:00 committed by GitHub
commit 4c4d0ba43b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 7893 additions and 912 deletions

View file

@ -1,5 +1,5 @@
module.exports = { module.exports = {
presets: ["@vue/cli-plugin-babel/preset"], presets: ["@vue/cli-plugin-babel/preset", "@babel/preset-typescript"],
plugins: [ plugins: [
[ [
"module:@jetblack/operator-overloading", "module:@jetblack/operator-overloading",

4
jest.config.js Normal file
View file

@ -0,0 +1,4 @@
module.exports = {
moduleDirectories: ["src", "node_modules"],
testEnvironment: "jsdom"
};

8772
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -6,11 +6,13 @@
"start": "vue-cli-service serve", "start": "vue-cli-service serve",
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint",
"test": "jest"
}, },
"dependencies": { "dependencies": {
"@pixi/particle-emitter": "^5.0.4", "@pixi/particle-emitter": "^5.0.4",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"jest-environment-jsdom": "^28.1.1",
"lodash.clonedeep": "^4.5.0", "lodash.clonedeep": "^4.5.0",
"lz-string": "^1.4.4", "lz-string": "^1.4.4",
"nanoevents": "^6.0.2", "nanoevents": "^6.0.2",
@ -24,9 +26,13 @@
"vuedraggable": "^4.1.0" "vuedraggable": "^4.1.0"
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@babel/preset-typescript": "^7.17.12",
"@ivanv/vue-collapse-transition": "^1.0.2", "@ivanv/vue-collapse-transition": "^1.0.2",
"@jetblack/operator-overloading": "^0.2.0", "@jetblack/operator-overloading": "^0.2.0",
"@rushstack/eslint-patch": "^1.1.0", "@rushstack/eslint-patch": "^1.1.0",
"@types/jest": "^28.1.3",
"@types/lodash.clonedeep": "^4.5.6", "@types/lodash.clonedeep": "^4.5.6",
"@types/lz-string": "^1.3.34", "@types/lz-string": "^1.3.34",
"@vue/babel-plugin-jsx": "^1.1.1", "@vue/babel-plugin-jsx": "^1.1.1",
@ -38,7 +44,9 @@
"@vue/eslint-config-prettier": "^7.0.0", "@vue/eslint-config-prettier": "^7.0.0",
"@vue/eslint-config-typescript": "^10.0.0", "@vue/eslint-config-typescript": "^10.0.0",
"babel-eslint": "^10.1.0", "babel-eslint": "^10.1.0",
"babel-jest": "^28.1.1",
"eslint": "^8.6.0", "eslint": "^8.6.0",
"jest": "^28.1.1",
"lint-staged": "^12.3.4", "lint-staged": "^12.3.4",
"prettier": "^2.5.1", "prettier": "^2.5.1",
"raw-loader": "^4.0.2", "raw-loader": "^4.0.2",

6
tests/example.test.ts Normal file
View file

@ -0,0 +1,6 @@
import Decimal from "util/bignum";
test("Decimals?", () => {
const x = new Decimal(3);
expect(x.m).toBe(3);
});

View file

@ -17,7 +17,8 @@
"sourceMap": true, "sourceMap": true,
"baseUrl": "src", "baseUrl": "src",
"types": [ "types": [
"webpack-env" "webpack-env",
"jest"
], ],
"lib": [ "lib": [
"esnext", "esnext",