-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: tests, idyll-document bug with new esbuild setup
- Loading branch information
1 parent
d293dbd
commit 0a81e4b
Showing
37 changed files
with
103 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
packages/idyll-cli/test/basic-project/src/components/CapitalPascal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
class PascalComponent extends React.PureComponent { | ||
render() { | ||
const {hasError, updateProps, idyll, ...props} = this.props; | ||
const { hasError, updateProps, idyll, ...props } = this.props; | ||
|
||
return ( | ||
<div {...props}> | ||
This is a custom component | ||
</div> | ||
); | ||
return <div {...props}>This is a custom component</div>; | ||
} | ||
} | ||
|
||
module.exports = PascalComponent; | ||
export default PascalComponent; |
22 changes: 7 additions & 15 deletions
22
packages/idyll-cli/test/basic-project/src/components/custom-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
class CustomComponent extends React.PureComponent { | ||
render() { | ||
const {hasError, updateProps, idyll, ...props} = this.props; | ||
return ( | ||
<div {...props}> | ||
This is a custom component | ||
</div> | ||
); | ||
const { hasError, updateProps, idyll, ...props } = this.props; | ||
return <div {...props}>This is a custom component</div>; | ||
} | ||
} | ||
|
||
module.exports = CustomComponent; | ||
export default CustomComponent; | ||
|
||
module.exports.IndexedComponent = class extends React.PureComponent { | ||
CustomComponent.IndexedComponent = class extends React.PureComponent { | ||
render() { | ||
const {hasError, updateProps, idyll, ...props} = this.props; | ||
return ( | ||
<div {...props}> | ||
This is another custom component | ||
</div> | ||
); | ||
const { hasError, updateProps, idyll, ...props } = this.props; | ||
return <div {...props}>This is another custom component</div>; | ||
} | ||
}; |
8 changes: 4 additions & 4 deletions
8
packages/idyll-cli/test/basic-project/src/components/functional-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
module.exports = () => { | ||
return <div>Let's put the fun back in functional!</div> | ||
} | ||
export default () => { | ||
return <div>Let's put the fun back in functional!</div>; | ||
}; |
5 changes: 3 additions & 2 deletions
5
packages/idyll-cli/test/basic-project/src/components/functional-default-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
export default () => | ||
export default () => ( | ||
<div> | ||
This is some text | ||
<button>And a button</button> | ||
Then some more text | ||
</div> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/idyll-cli/test/custom-ast/src/components/functional-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
module.exports = () => { | ||
export default () => { | ||
return <div>Let's put the fun back in functional!</div>; | ||
}; |
2 changes: 1 addition & 1 deletion
2
packages/idyll-cli/test/custom-ast/src/components/functional-default-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
export default () => ( | ||
<div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/idyll-cli/test/env-options/outer-project/components/functional-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
module.exports = () => { | ||
export default () => { | ||
return <div>Let's put the fun back in functional!</div>; | ||
}; |
2 changes: 1 addition & 1 deletion
2
packages/idyll-cli/test/env-options/outer-project/components/functional-default-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
export default () => ( | ||
<div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
packages/idyll-cli/test/minified-project/src/components/functional-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
module.exports = () => { | ||
export default () => { | ||
return <div>Let's put the fun back in functional!</div>; | ||
}; |
2 changes: 1 addition & 1 deletion
2
packages/idyll-cli/test/minified-project/src/components/functional-default-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
export default () => ( | ||
<div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 7 additions & 15 deletions
22
packages/idyll-cli/test/multiple-component-dirs/src/components-1/custom-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
class CustomComponent extends React.PureComponent { | ||
render() { | ||
const {hasError, updateProps, idyll, ...props} = this.props; | ||
return ( | ||
<div {...props}> | ||
This is a custom component | ||
</div> | ||
); | ||
const { hasError, updateProps, idyll, ...props } = this.props; | ||
return <div {...props}>This is a custom component</div>; | ||
} | ||
} | ||
|
||
module.exports = CustomComponent; | ||
export default CustomComponent; | ||
|
||
module.exports.IndexedComponent = class extends React.PureComponent { | ||
CustomComponent.IndexedComponent = class extends React.PureComponent { | ||
render() { | ||
const {hasError, updateProps, idyll, ...props} = this.props; | ||
return ( | ||
<div {...props}> | ||
This is another custom component | ||
</div> | ||
); | ||
const { hasError, updateProps, idyll, ...props } = this.props; | ||
return <div {...props}>This is another custom component</div>; | ||
} | ||
}; |
8 changes: 4 additions & 4 deletions
8
packages/idyll-cli/test/multiple-component-dirs/src/components-1/functional-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
module.exports = () => { | ||
return <div>Let's put the fun back in functional!</div> | ||
} | ||
export default () => { | ||
return <div>Let's put the fun back in functional!</div>; | ||
}; |
5 changes: 3 additions & 2 deletions
5
...s/idyll-cli/test/multiple-component-dirs/src/components-1/functional-default-component.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
export default () => | ||
export default () => ( | ||
<div> | ||
This is some text | ||
<button>And a button</button> | ||
Then some more text | ||
</div> | ||
); |
12 changes: 4 additions & 8 deletions
12
packages/idyll-cli/test/multiple-component-dirs/src/components-2/CapitalPascal.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
const React = require('react'); | ||
import React from 'react'; | ||
|
||
class PascalComponent extends React.PureComponent { | ||
render() { | ||
const {hasError, updateProps, idyll, ...props} = this.props; | ||
const { hasError, updateProps, idyll, ...props } = this.props; | ||
|
||
return ( | ||
<div {...props}> | ||
This is a custom component | ||
</div> | ||
); | ||
return <div {...props}>This is a custom component</div>; | ||
} | ||
} | ||
|
||
module.exports = PascalComponent; | ||
export default PascalComponent; |
Oops, something went wrong.