Skip to content

Commit

Permalink
Merge branch 'master' into coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
plusgut committed Apr 24, 2018
2 parents c2f0c30 + 7970d89 commit a5f10ac
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 19 deletions.
8 changes: 7 additions & 1 deletion configs/webpack.prod.conf.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
const constants = require('./constants');

module.exports = require('plusnew-webpack-config').prod('enzyme-adapter-plusnew', constants.baseDirectory);
const prodConfig = require('plusnew-webpack-config').prod('enzyme-adapter-plusnew', constants.baseDirectory);
prodConfig.externals = {
plusnew: 'plusnew',
enzyme: 'enzyme',
};

module.exports = prodConfig;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.5.98",
"description": "adapter for enzyme testsuite to the plusnew framework",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"scripts": {
"prepublishOnly": "yarn run test && yarn run build",
"build": "webpack --config configs/webpack.prod.conf.js",
Expand All @@ -20,7 +21,6 @@
},
"homepage": "https://github.com/plusnew/enzyme-adapter-plusnew#readme",
"devDependencies": {
"@types/enzyme": "3.1.9",
"concurrently": "3.5.1",
"enzyme": "3.3.0",
"plusnew": "0.5.95",
Expand Down
6 changes: 5 additions & 1 deletion src/shallow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@ import { PlusnewElement } from 'plusnew/dist/src/PlusnewAbstractElement';
import { props } from 'plusnew/dist/src/interfaces/component';
import PlusnewShallowWrapper from './wrapper/PlusnewShallowWrapper';

const plusnewShallow = function (node: plusnew.JSX.Element, options?: {}) {
type ShallowRendererProps = {};

const plusnewShallow = function (node: plusnew.JSX.Element, options?: ShallowRendererProps) {
const wrapper = shallow(node as any, options);

return new PlusnewShallowWrapper(wrapper);
};

export default plusnewShallow;

export { ShallowRendererProps };
1 change: 0 additions & 1 deletion src/wrapper/PlusnewMountWrapper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component } from './PlusnewCommonWrapper';
import PlusnewNurturedWrapper from './PlusnewNurturedWrapper';


export default class PlusnewMountWrapper extends PlusnewNurturedWrapper {
wrapper: PlusnewMountWrapper;
WrapperClass = PlusnewMountWrapper;
Expand Down
15 changes: 0 additions & 15 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@
version "0.7.0"
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.7.0.tgz#9a06f4f137ee84d7df0460c1fdb1135ffa6c50fd"

"@types/cheerio@*":
version "0.22.7"
resolved "https://registry.yarnpkg.com/@types/cheerio/-/cheerio-0.22.7.tgz#4a92eafedfb2b9f4437d3a4410006d81114c66ce"

"@types/enzyme@3.1.9":
version "3.1.9"
resolved "https://registry.yarnpkg.com/@types/enzyme/-/enzyme-3.1.9.tgz#fbd97f3beb7cad76fc9c6f04c97d77f4834522ef"
dependencies:
"@types/cheerio" "*"
"@types/react" "*"

"@types/jasmine@^2.8.6":
version "2.8.6"
resolved "https://registry.yarnpkg.com/@types/jasmine/-/jasmine-2.8.6.tgz#14445b6a1613cf4e05dd61c3c3256d0e95c0421e"
Expand All @@ -41,10 +30,6 @@
version "9.6.1"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.1.tgz#e2d374ef15b315b48e7efc308fa1a7cd51faa06c"

"@types/react@*":
version "16.1.0"
resolved "https://registry.yarnpkg.com/@types/react/-/react-16.1.0.tgz#6c0e9955ce73f332b4a1948d45decaf18c764c6e"

abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
Expand Down

0 comments on commit a5f10ac

Please sign in to comment.