-
Notifications
You must be signed in to change notification settings - Fork 23
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
feat(stark-testing): create separate stark-testing package and use it in all stark packages and starter #267
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0bbcc9d
feat(stark-testing): create separate stark-testing package. Replace t…
christophercr d3f0de2
chore(stark-testing): upgrade dependencies in stark-testing package. …
christophercr 7c6f16f
fix(stark-testing): downgrade 'jasmine-core' dependency due to an iss…
christophercr 2343d62
fix(starter): clean up tsconfig.spec.json for unit testing
christophercr 428431a
Merge branch 'master' into master
christophercr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 @@ | ||
/** | ||
* Look in ./config for karma.conf.js | ||
* Look in stark-testing for karma.conf.typescript.js | ||
*/ | ||
module.exports = require("./node_modules/@nationalbankbelgium/stark-build/config/karma.conf.typescript.js"); | ||
module.exports = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.typescript.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
const path = require("path"); | ||
|
||
/** | ||
* Helper functions. | ||
*/ | ||
// const ROOT = path.resolve(__dirname, '..'); | ||
const _root = path.resolve(process.cwd(), "."); // project root folder | ||
|
||
const root = path.join.bind(path, _root); | ||
|
||
exports.root = root; |
File renamed without changes.
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,38 @@ | ||
{ | ||
"name": "@nationalbankbelgium/stark-testing", | ||
"version": "0.0.0-PLACEHOLDER-VERSION", | ||
"main": "karma.conf.typescript.js", | ||
"types": "stark-testing.d.ts", | ||
"description": "Stark - Testing", | ||
"author": "Stark Team", | ||
"contributors": [ | ||
"PLACEHOLDER-CONTRIBUTORS" | ||
], | ||
"license": "MIT", | ||
"bugs": "https://github.com/nationalbankbelgium/stark/issues", | ||
"homepage": "https://github.com/nationalbankbelgium/stark", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/NationalBankBelgium/stark.git" | ||
}, | ||
"engines": { | ||
"node": ">=6.11.0", | ||
"npm": ">=5.3.0" | ||
}, | ||
"dependencies": { | ||
"@types/jasmine": "2.8.6", | ||
"@types/node": "6.0.102", | ||
"istanbul-instrumenter-loader": "3.0.0", | ||
"jasmine-core": "2.99.1", | ||
"karma": "2.0.0", | ||
"karma-chrome-launcher": "2.2.0", | ||
"karma-coverage": "1.1.1", | ||
"karma-jasmine": "1.1.1", | ||
"karma-mocha-reporter": "2.2.5", | ||
"karma-remap-coverage": "0.1.5", | ||
"karma-sourcemap-loader": "0.3.7", | ||
"karma-spec-reporter": "0.0.32", | ||
"karma-typescript": "3.0.12", | ||
"karma-typescript-angular2-transform": "1.0.2" | ||
} | ||
} |
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,20 @@ | ||
"use strict"; | ||
|
||
const resolve = require("rollup-plugin-node-resolve"); | ||
const commonjs = require("rollup-plugin-commonjs"); | ||
|
||
module.exports = { | ||
//export default { | ||
input: "../../dist/packages-dist/stark-testing/karma.conf.typescript.js", | ||
output: [ | ||
{ | ||
file: "../../dist/packages-dist/stark-testing/stark-testing.js", | ||
format: "cjs", | ||
name: "stark.testing" | ||
} | ||
], | ||
plugins: [ | ||
resolve(), | ||
commonjs() // converts date-fns to ES modules | ||
] | ||
}; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** | ||
* Look in ./config for karma.conf.js | ||
*/ | ||
module.exports = require("./node_modules/@nationalbankbelgium/stark-build/config/karma.conf.typescript.js"); | ||
module.exports = require("./node_modules/@nationalbankbelgium/stark-testing/karma.conf.typescript.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
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not put a peerDependency on @nbb/stark-build and use helpers directly from stark-build ?
Except if we only plan to use root(). But maybe later for e2e we will use other methods already defined stark-build/config/helpers.js.
What do you think about that ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the idea is to make Stark as flexible as possible, so normally all the testing tooling is just a decision we made in Stark and should not have any impact in the final users of Stark (install our deps in their project) if they decide use another tooling.
So, we should keep this package as independent as possible, because again, Stark is really flexible and the stark-build might not be the package selected by the user to build their app...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In any case, we can review this later once we have a better view on how all our packages will be used in a client app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for me