From 4f250563fd6afb2820ad4725ac7f684ef3dceb9d Mon Sep 17 00:00:00 2001 From: Justin Schroeder Date: Fri, 1 Nov 2019 17:12:27 -0400 Subject: [PATCH] Updated formualte to be capitalized --- .vscode/launch.json | 21 +++++++++ .vscode/settings.json | 3 ++ babel.config.js | 2 +- package-lock.json | 69 ++++++++---------------------- src/{formulate.js => Formulate.js} | 0 test/FormulateInputText.test.js | 4 ++ test/jest.conf.js | 3 ++ 7 files changed, 51 insertions(+), 51 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json rename src/{formulate.js => Formulate.js} (100%) diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..20535bd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,21 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "node", + "name": "vscode-jest-tests", + "request": "launch", + "args": [ + "--runInBand" + ], + "cwd": "${workspaceFolder}", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen", + "disableOptimisticBPs": true, + "program": "${workspaceFolder}/node_modules/jest/bin/jest" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..a91efeb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "jest.showCoverageOnLoad": true +} diff --git a/babel.config.js b/babel.config.js index 3aaa109..24e3c70 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,6 +1,6 @@ module.exports = { env: { - test: { + testing: { presets: [ [ '@babel/preset-env', { targets: { diff --git a/package-lock.json b/package-lock.json index a07cf8f..b176d7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1129,8 +1129,7 @@ "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/babel-types/-/babel-types-7.0.7.tgz", "integrity": "sha512-dBtBbrc+qTHy1WdfHYjBwRln4+LWqASWakLHsWHR2NWHIFkv4W3O070IGoGLEBrJBvct3r0L1BUPuvURi7kYUQ==", - "dev": true, - "optional": true + "dev": true }, "@types/babel__core": { "version": "7.1.3", @@ -1178,7 +1177,6 @@ "resolved": "https://registry.npmjs.org/@types/babylon/-/babylon-6.16.5.tgz", "integrity": "sha512-xH2e58elpj1X4ynnKp9qSnWlsRTIs6n3tgLGNfwAGHwePw0mulHQllV34n0T25uYSu1k0hRKkWXF890B1yS47w==", "dev": true, - "optional": true, "requires": { "@types/babel-types": "*" } @@ -1414,7 +1412,6 @@ "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", "dev": true, - "optional": true, "requires": { "kind-of": "^3.0.2", "longest": "^1.0.1", @@ -1426,7 +1423,6 @@ "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", "dev": true, - "optional": true, "requires": { "is-buffer": "^1.1.5" } @@ -2445,8 +2441,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "optional": true + "dev": true }, "to-regex-range": { "version": "5.0.1", @@ -2697,7 +2692,6 @@ "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-3.1.2.tgz", "integrity": "sha512-yePcBqEFhLOqSBtwYOGGS1exHo/s1xjekXiinh4itpNQGCu4KA1euPh1fg07N2wMITZXQkBz75Ntdt1ctGZouw==", "dev": true, - "optional": true, "requires": { "@types/babel-types": "^7.0.0", "@types/babylon": "^6.16.2", @@ -4232,8 +4226,7 @@ "ansi-regex": { "version": "2.1.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "aproba": { "version": "1.2.0", @@ -4254,14 +4247,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4276,20 +4267,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -4406,8 +4394,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -4419,7 +4406,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4434,7 +4420,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4442,14 +4427,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.3.5", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -4468,7 +4451,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4549,8 +4531,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -4562,7 +4543,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4648,8 +4628,7 @@ "safe-buffer": { "version": "5.1.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "safer-buffer": { "version": "2.1.2", @@ -4685,7 +4664,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4705,7 +4683,6 @@ "version": "3.0.1", "bundled": true, "dev": true, - "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -4749,14 +4726,12 @@ "wrappy": { "version": "1.0.2", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "yallist": { "version": "3.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true } } }, @@ -6266,8 +6241,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/js-stringify/-/js-stringify-1.0.2.tgz", "integrity": "sha1-Fzb939lyTyijaCrcYjCufk6Weds=", - "dev": true, - "optional": true + "dev": true }, "js-tokens": { "version": "4.0.0", @@ -6574,8 +6548,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true, - "optional": true + "dev": true }, "loose-envify": { "version": "1.4.0", @@ -7586,8 +7559,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.1.0.tgz", "integrity": "sha512-uhnEDzAbrcJ8R3g2fANnSuXZMBtkpSjxTTgn2LeSiQlfmq72enQJWdQllXW24MBLYnA1SBD2vfvx2o0Zw3Ielw==", - "dev": true, - "optional": true + "dev": true }, "pify": { "version": "2.3.0", @@ -8751,8 +8723,7 @@ "version": "1.3.3", "resolved": "https://registry.npmjs.org/pug-error/-/pug-error-1.3.3.tgz", "integrity": "sha512-qE3YhESP2mRAWMFJgKdtT5D7ckThRScXRwkfo+Erqga7dyJdY3ZquspprMCj/9sJ2ijm5hXFWQE/A3l4poMWiQ==", - "dev": true, - "optional": true + "dev": true }, "pug-filters": { "version": "3.1.1", @@ -8872,8 +8843,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/pug-runtime/-/pug-runtime-2.0.5.tgz", "integrity": "sha512-P+rXKn9un4fQY77wtpcuFyvFaBww7/91f3jHa154qU26qFAnOe6SW1CbIDcxiG5lLK9HazYrMCCuDvNgDQNptw==", - "dev": true, - "optional": true + "dev": true }, "pug-strip-comments": { "version": "1.0.4", @@ -8889,8 +8859,7 @@ "version": "1.1.8", "resolved": "https://registry.npmjs.org/pug-walk/-/pug-walk-1.1.8.tgz", "integrity": "sha512-GMu3M5nUL3fju4/egXwZO0XLi6fW/K3T3VTgFQ14GxNi8btlxgT5qZL//JwZFm/2Fa64J/PNS8AZeys3wiMkVA==", - "dev": true, - "optional": true + "dev": true }, "pump": { "version": "3.0.0", diff --git a/src/formulate.js b/src/Formulate.js similarity index 100% rename from src/formulate.js rename to src/Formulate.js diff --git a/test/FormulateInputText.test.js b/test/FormulateInputText.test.js index 4b47736..933112d 100644 --- a/test/FormulateInputText.test.js +++ b/test/FormulateInputText.test.js @@ -142,6 +142,10 @@ test('test that inputs that arent updated dont re-context themselves', () => { expect(wrapper.find({ref: "second"}).vm.context === secondContext).toBe(true) }) +test('this one should fail', () => { + expect(false).tobe(true) +}) + test('test that inputs contain their v-model value as the initial input', () => { const wrapper = mount(FormulateInput, { propsData: { type: 'text', formulateValue: 'initial val' } }) expect(wrapper.find('input').element.value).toBe('initial val') diff --git a/test/jest.conf.js b/test/jest.conf.js index eb06cfa..a90d3ab 100644 --- a/test/jest.conf.js +++ b/test/jest.conf.js @@ -10,6 +10,9 @@ module.exports = { moduleNameMapper: { '^@/(.*)$': '/src/$1' }, + modulePaths: [ + "" + ], transform: { '.*\\.js$': '/node_modules/babel-jest', '.*\\.(vue)$': '/node_modules/jest-vue-preprocessor'