Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Holy crap the tests are passing #177

Merged
merged 7 commits into from
Sep 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/idyll-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"yargs": "8.0.1"
},
"devDependencies": {
"jest": "19.0.2",
"rimraf": "2.6.1"
"jest": "20.0.4",
"rimraf": "2.6.2"
}
}

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/idyll-cli/test/batteries-included/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div id="idyll-mount"><div class="idyll-root" data-reactroot="" data-reactid="1" data-react-checksum="1771217809"><div class="article-header" data-reactid="2"><h1 class="hed" data-reactid="3">Welcome to Idyll</h1><h2 class="dek" data-reactid="4">Open index.idl to start writing</h2><div class="byline" data-reactid="5"><!-- react-text: 6 -->By: <!-- /react-text --><a href="https://idyll-lang.github.io" data-reactid="7">Your Name Here</a></div></div><p data-reactid="8"><!-- react-text: 9 -->This is an Idyll file. Write text
<div id="idyll-mount"><div class="idyll-root" data-reactroot="" data-reactid="1" data-react-checksum="501264030"><div class="article-header" data-reactid="2"><h1 class="hed" data-reactid="3">Welcome to Idyll</h1><h2 class="dek" data-reactid="4">Open index.idl to start writing</h2><div class="byline" data-reactid="5"><!-- react-text: 6 -->By: <!-- /react-text --><a href="https://idyll-lang.github.io" data-reactid="7">Your Name Here</a></div></div><p data-reactid="8"><!-- react-text: 9 -->This is an Idyll file. Write text
as you please in here. To add interactivity,
you can add different components to the text.<!-- /react-text --></p><p data-reactid="10"><!-- react-text: 11 -->Here is how you can use a variable:<!-- /react-text --></p><div data-reactid="12"><input type="range" step="1" min="0" max="10" value="5" data-reactid="13"/><span data-reactid="14">5.00</span></div><pre data-reactid="15"><code data-reactid="16"><!-- react-text: 17 -->var code = true;<!-- /react-text --></code></pre><p data-reactid="18"><!-- react-text: 19 -->And here is a custom component:<!-- /react-text --></p><p data-reactid="20"><!-- react-text: 21 -->You can use standard html tags if a
you can add different components to the text.<!-- /react-text --></p><p data-reactid="10"><!-- react-text: 11 -->Here is how you can use a variable:<!-- /react-text --></p><span data-reactid="12"><input type="range" step="1" min="0" max="10" value="5" data-reactid="13"/></span><span data-reactid="14"><span data-reactid="15">5.00</span></span><pre data-reactid="16"><code data-reactid="17"><!-- react-text: 18 -->var code = true;<!-- /react-text --></code></pre><p data-reactid="19"><!-- react-text: 20 -->And here is a custom component:<!-- /react-text --></p><p data-reactid="21"><!-- react-text: 22 -->You can use standard html tags if a
component with the same name
doesn’t exist.<!-- /react-text --></p></div></div>
<script src="index.js"></script>
Expand Down
13,412 changes: 6,547 additions & 6,865 deletions packages/idyll-cli/test/batteries-included/build/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions packages/idyll-cli/test/batteries-included/build/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ input {
.relative {
position: relative;
}
.aside-container {
position: relative;
}
.aside {
position: absolute;
width: 300px;
Expand Down
19 changes: 8 additions & 11 deletions packages/idyll-components/.babelrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
const BABEL_ENV = process.env.BABEL_ENV;
const env = {
cjs: 'env',
es: [
'env', { loose: true, modules: false }
],
test: [
'es2015'
]
}[BABEL_ENV];
const { BABEL_ENV, NODE_ENV } = process.env;

module.exports = {
plugins: ['transform-object-rest-spread'],
presets: [
env,
[
'env',
{
loose: true,
modules: BABEL_ENV === 'cjs' || NODE_ENV === 'test' ? 'commonjs' : false,
},
],
'react',
],
};
5 changes: 2 additions & 3 deletions packages/idyll-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"build:es": "cross-env BABEL_ENV=es babel src -d dist/es",
"build": "npm run build:cjs && npm run build:es",
"prepublishOnly": "npm run build",
"test": "cross-env BABEL_ENV=test jest"
"test": "jest"
},
"jest": {
"testMatch": [
Expand All @@ -34,7 +34,6 @@
},
"homepage": "https://github.com/idyll-lang/idyll#readme",
"dependencies": {
"babel-jest": "^21.0.2",
"cross-env": "^5.0.5",
"d3-array": "^1.2.0",
"d3-drag": "^1.1.1",
Expand All @@ -57,7 +56,7 @@
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"enzyme": "^2.9.1",
"jest": "^21.1.0",
"jest": "^20.0.4",
"react": "^15.6.1",
"react-addons-test-utils": "^15.6.0",
"react-dom": "^15.6.1",
Expand Down
19 changes: 8 additions & 11 deletions packages/idyll-document/.babelrc.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
const BABEL_ENV = process.env.BABEL_ENV;
const env = {
cjs: 'env',
es: [
'env', { loose: true, modules: false }
],
test: [
'es2015'
]
}[BABEL_ENV];
const { BABEL_ENV, NODE_ENV } = process.env;

module.exports = {
plugins: ['transform-object-rest-spread'],
presets: [
env,
[
'env',
{
loose: true,
modules: BABEL_ENV === 'cjs' || NODE_ENV === 'test' ? 'commonjs' : false,
},
],
'react',
],
};
5 changes: 2 additions & 3 deletions packages/idyll-document/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
"build:es": "cross-env BABEL_ENV=es babel src -d dist/es",
"build": "npm run build:cjs && npm run build:es",
"prepublishOnly": "npm run build",
"test": "cross-env BABEL_ENV=test jest"
"test": "jest"
},
"jest": {
"testMatch": [
"**/test/**/*.js"
]
},
"dependencies": {
"babel-jest": "^21.0.2",
"change-case": "^3.0.1",
"cross-env": "^5.0.5",
"html-tags": "^2.0.0",
Expand All @@ -37,7 +36,7 @@
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.1",
"enzyme": "^2.9.1",
"jest": "^21.1.0",
"jest": "^20.0.4",
"react": "^15.6.1",
"react-dom": "^15.6.1",
"react-test-renderer": "^15.6.1",
Expand Down
Loading