-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(tests): reactjs tests template component cli
- Loading branch information
1 parent
521e322
commit 328b020
Showing
5 changed files
with
104 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const helpers = require('yeoman-test') | ||
const assert = require('yeoman-assert') | ||
|
||
describe('\n ReactJS 😸', () => { | ||
beforeAll(() => { | ||
return helpers | ||
.run(path.join(__dirname, '../app')) | ||
.withOptions({ path: './Foo' }) | ||
.withArguments('Bar') | ||
.withPrompts({ framework: 'reactjsComponent' }) | ||
}) | ||
|
||
it('should create all files from resource Bar in folder Foo', () => { | ||
assert.file([ | ||
'./Foo/components/Bar/component.tsx', | ||
'./Foo/components/Bar/index.tsx', | ||
]) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const helpers = require('yeoman-test') | ||
const assert = require('yeoman-assert') | ||
|
||
describe('\n ReactJS 😸', () => { | ||
beforeAll(() => { | ||
return helpers | ||
.run(path.join(__dirname, '../app')) | ||
.withOptions({ path: './Foo' }) | ||
.withArguments('Bar') | ||
.withPrompts({ framework: 'reactjsContext' }) | ||
}) | ||
|
||
it('should create all files from resource Bar in folder Foo', () => { | ||
assert.file(['./Foo/contexts/BarContext.tsx']) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const helpers = require('yeoman-test') | ||
const assert = require('yeoman-assert') | ||
|
||
describe('\n ReactJS 😸', () => { | ||
beforeAll(() => { | ||
return helpers | ||
.run(path.join(__dirname, '../app')) | ||
.withOptions({ path: './Foo' }) | ||
.withArguments('Bar') | ||
.withPrompts({ framework: 'reactjsHook' }) | ||
}) | ||
|
||
it('should create all files from resource Bar in folder Foo', () => { | ||
assert.file(['./Foo/hooks/useBar.tsx']) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const helpers = require('yeoman-test') | ||
const assert = require('yeoman-assert') | ||
|
||
describe('\n ReactJS 😸', () => { | ||
beforeAll(() => { | ||
return helpers | ||
.run(path.join(__dirname, '../app')) | ||
.withOptions({ path: './Foo' }) | ||
.withArguments('Bar') | ||
.withPrompts({ framework: 'reactjsMui' }) | ||
}) | ||
|
||
it('should create all files from resource Bar in folder Foo', () => { | ||
assert.file([ | ||
'./Foo/components/Bar/component.tsx', | ||
'./Foo/components/Bar/index.tsx', | ||
]) | ||
}) | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
'use strict' | ||
|
||
const path = require('path') | ||
const helpers = require('yeoman-test') | ||
const assert = require('yeoman-assert') | ||
|
||
describe('\n ReactJS 😸', () => { | ||
beforeAll(() => { | ||
return helpers | ||
.run(path.join(__dirname, '../app')) | ||
.withOptions({ path: './Foo' }) | ||
.withArguments('Bar') | ||
.withPrompts({ framework: 'reactjsStyled' }) | ||
}) | ||
|
||
it('should create all files from resource Bar in folder Foo', () => { | ||
assert.file([ | ||
'./Foo/components/Bar/component.tsx', | ||
'./Foo/components/Bar/index.tsx', | ||
]) | ||
}) | ||
}) |