Skip to content

Commit

Permalink
test(resolver-react): e2e tests update with react resolver usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Igmat committed Feb 28, 2018
1 parent 43aea7a commit bd465a2
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 13 deletions.
7 changes: 6 additions & 1 deletion tests/babel-project/.basetrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"specs": "**/*.spec.jsx",
"bases": "**/*.base",
"plugins": {
".spec.jsx$": ["baset-env-browser", "baset-reader-babel", "baset-baseliner-json"]
".spec.jsx?$": {
"environment": "baset-env-browser",
"readers": ["baset-reader-babel"],
"resolvers": "baset-resolver-react",
"baseliner": "baset-baseliner-json"
}
}
}
3 changes: 1 addition & 2 deletions tests/babel-project/index.spec.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom/server';
import { jsxFn } from './index';

export const value = ReactDOM.renderToString(
export const value = (
<div>
{jsxFn('s', 's')}
{jsxFn('abc', 'cba')}
Expand Down
1 change: 1 addition & 0 deletions tests/babel-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"baset": "^0.8.0",
"baset-baseliner-json": "^0.8.0",
"baset-env-browser": "^0.8.0",
"baset-resolver-react": "^0.8.0",
"baset-reader-babel": "^0.8.0"
}
}
7 changes: 6 additions & 1 deletion tests/tsx-babel-project/.basetrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"specs": "**/*.spec.ts?(x)",
"bases": "**/*.base",
"plugins": {
".spec.tsx?$": ["baset-env-browser", "baset-reader-ts", "baset-reader-babel", "baset-baseliner-json"]
".spec.tsx?$": {
"environment": "baset-env-browser",
"readers": ["baset-reader-ts", "baset-reader-babel"],
"resolvers": "baset-resolver-react",
"baseliner": "baset-baseliner-json"
}
}
}
5 changes: 2 additions & 3 deletions tests/tsx-babel-project/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom/server';
import { jsxFn } from './index';

export const value = ReactDOM.renderToString(
export const value = (
<div>
{jsxFn('s', 's')}
{jsxFn('abc', 'cba')}
{jsxFn('s', 'abc')}
{jsxFn('abc', 's')}
</div>,
</div>
);
1 change: 1 addition & 0 deletions tests/tsx-babel-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"baset-env-browser": "^0.8.0",
"baset-reader-babel": "^0.8.0",
"baset-reader-ts": "^0.8.0",
"baset-resolver-react": "^0.8.0",
"typescript": "next"
}
}
2 changes: 1 addition & 1 deletion tests/tsx-project/.basetrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"specs": "**/*.spec.ts?(x)",
"bases": "**/*.base",
"plugins": {
".spec.tsx?$": ["baset-env-browser", "baset-reader-ts", "baset-baseliner-json"]
".spec.tsx?$": ["baset-env-browser", "baset-reader-ts", "baset-resolver-react", "baset-baseliner-json"]
}
}
5 changes: 2 additions & 3 deletions tests/tsx-project/index.spec.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import * as React from 'react';
import * as ReactDOM from 'react-dom/server';
import { jsxFn } from './index';

export const value = ReactDOM.renderToString(
export const value = (
<div>
{jsxFn('s', 's')}
{jsxFn('abc', 'cba')}
{jsxFn('s', 'abc')}
{jsxFn('abc', 's')}
</div>,
</div>
);
5 changes: 3 additions & 2 deletions tests/tsx-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"react-dom": "16.2.0"
},
"devDependencies": {
"@types/react": "^16.0.36",
"@types/react-dom": "^16.0.3",
"@types/react": "^16.0.38",
"@types/react-dom": "^16.0.4",
"baset": "^0.8.0",
"baset-baseliner-json": "^0.8.0",
"baset-env-browser": "^0.8.0",
"baset-reader-ts": "^0.8.0",
"baset-resolver-react": "^0.8.0",
"typescript": "next"
}
}

0 comments on commit bd465a2

Please sign in to comment.