-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactor to support testsuites root element attributes/properties
Fixes #8
- Loading branch information
Showing
12 changed files
with
386 additions
and
218 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
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,30 +1,36 @@ | ||
var Builder = require('./builder'); | ||
var TestSuite = require('./test_suite'); | ||
var TestCase = require('./test_case'); | ||
var { Builder } = require('./builder'); | ||
var { TestSuites } = require('./test_suites'); | ||
var { TestSuite } = require('./test_suite'); | ||
var { TestCase } = require('./test_case'); | ||
|
||
class Factory { | ||
constructor() {} | ||
|
||
/** | ||
* @returns {Builder} | ||
* @returns {import('./builder').Builder} | ||
*/ | ||
newBuilder() { | ||
return new Builder(this); | ||
} | ||
|
||
/** | ||
* @returns {TestSuite} | ||
* @returns {import('./test_suite').TestSuite} | ||
*/ | ||
newTestSuite() { | ||
return new TestSuite(this); | ||
} | ||
|
||
/** | ||
* @returns {TestCase} | ||
* @returns {import('./test_case').TestCase} | ||
*/ | ||
newTestCase() { | ||
return new TestCase(this); | ||
} | ||
|
||
/** | ||
* @returns {import('./test_suites').TestSuites} | ||
*/ | ||
newTestSuites() { | ||
return new TestSuites(this); | ||
} | ||
} | ||
|
||
module.exports = Factory; | ||
module.exports = { Factory: Factory }; |
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,3 +1,3 @@ | ||
var Factory = require('./factory'); | ||
var { Factory } = require('./factory'); | ||
|
||
module.exports = new Factory().newBuilder(); |
Oops, something went wrong.