diff --git a/jest.unit.config.json b/jest.unit.config.json index 95d4a069..73cb09e0 100644 --- a/jest.unit.config.json +++ b/jest.unit.config.json @@ -36,5 +36,8 @@ "sort": "status", "outputPath": "./out/Unit Tests Report.html" }] + ], + "setupFiles": [ + "./spec/setup/test-setup.js" ] } diff --git a/package.json b/package.json index 65645dda..8f704a0a 100644 --- a/package.json +++ b/package.json @@ -80,6 +80,7 @@ }, "devDependencies": { "@types/auto-launch": "^5.0.0", + "@types/enzyme": "^3.9.0", "@types/ffi": "0.2.1", "@types/jest": "23.3.12", "@types/lodash.omit": "^4.5.4", @@ -103,6 +104,8 @@ "electron-chromedriver": "4.0.0-beta.1", "electron-packager": "13.0.1", "electron-rebuild": "1.8.2", + "enzyme": "^3.9.0", + "enzyme-adapter-react-16": "^1.10.0", "eslint": "5.6.1", "eslint-config-airbnb": "17.1.0", "eslint-plugin-import": "2.14.0", diff --git a/spec/__snapshots__/downloadManager.spec.ts.snap b/spec/__snapshots__/downloadManager.spec.ts.snap new file mode 100644 index 00000000..bec11331 --- /dev/null +++ b/spec/__snapshots__/downloadManager.spec.ts.snap @@ -0,0 +1,181 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`download manager should render correctly 1`] = ` +ShallowWrapper { + Symbol(enzyme.__root__): [Circular], + Symbol(enzyme.__unrendered__): , + Symbol(enzyme.__renderer__): Object { + "batchedUpdates": [Function], + "checkPropTypes": [Function], + "getNode": [Function], + "render": [Function], + "simulateError": [Function], + "simulateEvent": [Function], + "unmount": [Function], + }, + Symbol(enzyme.__node__): Object { + "instance": null, + "key": undefined, + "nodeType": "host", + "props": Object { + "children": , + }, + "ref": null, + "rendered": Object { + "instance": null, + "key": undefined, + "nodeType": "host", + "props": Object { + "children": Array [ +