Our great sponsors
-
ts-jest
A Jest transformer with source map support that lets you use Jest to test projects written in TypeScript.
We are using typescript in our project. To properly setup jest we would need to install ts-jest package as well.
-
$ npm run test > [email protected] test > jest FAIL tests/unit/HelloWorld.spec.ts HelloWorld.vue ✕ renders props.msg when passed (2 ms) ● HelloWorld.vue › renders props.msg when passed The error below may be caused by using the wrong test environment, see https://jestjs.io/docs/configuration#testenvironment-string. Consider using the "jsdom" test environment. ReferenceError: document is not defined 5 | it('renders props.msg when passed', () => { 6 | const msg = 'new message' > 7 | const wrapper = shallowMount(HelloWorld, { | ^ 8 | props: { msg }, 9 | }) 10 | expect(wrapper.text()).toMatch(msg) at mount (node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:7640:14) at Object.shallowMount (node_modules/@vue/test-utils/dist/vue-test-utils.cjs.js:7852:12) at Object. (tests/unit/HelloWorld.spec.ts:7:21) Test Suites: 1 failed, 1 total Tests: 1 failed, 1 total Snapshots: 0 total Time: 4.061 s Ran all test suites.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.