-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added expected and actual to TestResults class * First pass of MochaTestReporter * Added actual and expected to assertTrue and assertFalse * New string function and more assert messages * Cleaned up message generation * Fixed failing unit test * Cleaned up some messaging output * Do not report empty actual and expected diffs * actual and expected are invalid by default * whitespace clean up * Made temp logs less spammy * More assertion updates * Updates to most aa and array asserts * clean up on displaying types * Updates to assertArrayCount * Updates to assertArrayCount to fix a crash case * Messaging updates * Updated array count assertions * updated assertNotEmpty and assertEmpty * Fixed a actual/expected filting bug * Added tests to sample project * Fixed a bug with assertArrayNotCount * Updates to assertArrayContainsOnlyValuesOfType and assertType * Fixed a bug in assertArrayContainsOnlyValuesOfType with AA's * Removed stop statement * updates to assertArrayNotContainsSubset, assertArrayContainsSubset, and more tests for AssertArrayContains * updates to assertClass and assertSubType * Fixed a bugt in assertArrayNotContainsSubset that would always fail for aa subsets * updated assertNodeCount * More updates * Updates assets to respect custom failure messages when supplied * remove only annotation * Fixed a crash in eqAssocArray * Fixed some unexpected failing tests * Fixed some failure messages for assert true and false * Tweeks to empty multiline aa and array * Fixed a crash reporting node tests due to missing actual and expected results * Fixed a bug related to ignoredFields * Fixed a error log that would print even when there was no error for node tests * Added new test reporter hooks * implimented new hooks and moved logs into reporters * Fixed a falure case that would pass * Include ignored tests but skip their exicution when found * Moved tests that should fail to their own suite * Removed old commited code * Removed an ignore anotation * Fixed some issues with skipped tests * Updated the console test reporter to handle skipped and ignored tests/groups/suites * Fixed a regression in the console test reporter * Fixed some broken tests * Re-enabled catch on crash * Added new colorizeOutput setting * Formatting fixes * linking fixes * replaced short hand prints * Moved diffing logic into an internal namespace to prevent code conflicts * Code clean up * Updated reporters to take event objects * Updated brighterscript to 0.68.3 * Updated brighterscript to 0.68.3 for test workspace * Added a log that will always fire after test reporters * Removed some unnessisary prints from mocha reporter * Doc blocks * Made stacktraces easier to read and added test file links in crashes * Typo * More tests * Removed actual and expected from assertNotEqual * More failure tests * More failure tests for assertArrayNotContains * Cleaned up some tests * Fixed assertAANotHasKey not marking tests as failed in some cases * Fixed crash in assertInvalid * Added actual and expected diff for assertAAHasKeys * Cleaned up some failure messages * More tests and clean up for failed assertions * Updated asMultilineString to print invalid and uninitialized as their types * comment typo * Code clean up and lots more comments in mocha test reporter * Fixed the reports namespace name to be reporter * Moved some logs to a new warning log rather then error * updated assertClass to remove actual and expected diff * Fixed uninitilized not being comparable with eqValues * Fixed mocha results printing * Fixed most failing tests * Update CommonUtils.bs * Update CommonUtils.bs * Update TestGroup.bs * Update CodeCoverageProcessor.spec.ts * installed ropm and promises * added fast glob npm module * updated FileFactory to use flog to find framework files * Updated the framework fold structure to match what will be on device * Fixed build copy command * Code clean up and removed unessisary props following the structure change * Removed options from FileFactory constructor * Updated the promises prefix and FileFactory to auto import it * Moved MochaTestReporter class into source/rooibos * Added a couple passing tests for assertInvalid * Added example test showing promises are imported with rooibos tests * Always sort keys in aa when generating diff strings * Added support for reporting slow tests * Fixed failing test * Fixed a rehydration issue * Create differed promises in node tests * Added some examples returning promises from tests * First pass as promises in node/async tests * Added more tests that levrage promises * Added support for using native nodes in node tests * Async tests are now automaticly flagged as Node tests * Fixed a thread ownership issue if your node test uses a non-renderable node * Reduced the delay in some tests as they did not need to be so long * renammed vars differed to deferred * Removed threadinto prints * Fixed some bugs and removed some unused callbacks and node fields * Updated how results from node tests are passed back to the main thread test runner * Updated how the test time is recorded and moved some logic into functions for clarity * removed some commented out code * Fixed failing test * Fixed a bug where function names that start with a number would transpile invalid output * Added a suite to test suite level time outs * Added the new timeout logic to the suite and removed lagicy code * Fixed an issue where identical diffs would attempt to be rendered * Update BaseTestSuite.bs * Update Test.bs * Moved back to brighterscript 0.67.4 * Cleaned up unused field and unnecessary call back * Added some tests to prove returning promises fails tests when in non-node tests * Removed only annotation in spec file * Updated docs with some information on promises * Added an example of how to use assertAsyncField to watch a field on a task in a non-node test * package-lock update * Log message update * Fixed typos in docs * Added doc for slow annotation * Added tons of tests for passing usecases * Update bsc-plugin/src/lib/rooibos/CodeCoverageProcessor.spec.ts * New line when tests start * Remove the `postinstall` script during packaging * Give slow test more time to complete * Fix lint issue * Added assertNotInvalid test for roInvalid * Updated assertInvalid test for roInvalid * hardened assertNotInvalid and fixed assertInvalid for roInvalid * Fixed some off by oneline number reporting bugs * fixes after updating with reporting line number fixes from mocha branch --------- Co-authored-by: Bronley Plumb <[email protected]>
- Loading branch information
1 parent
ebfd429
commit e68b898
Showing
23 changed files
with
1,555 additions
and
216 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,20 @@ | ||
var fsExtra = require('fs-extra'); | ||
var path = require('path'); | ||
|
||
var cachePath = path.join(__dirname, 'pack-cache.txt'); | ||
var packageJsonPath = path.join(__dirname, '../package.json'); | ||
|
||
var packageJson = fsExtra.readJsonSync(packageJsonPath); | ||
|
||
//store the script and remove it from package.json | ||
if (process.argv.includes('--pre')) { | ||
fsExtra.outputFileSync(cachePath, packageJson.scripts.postinstall); | ||
delete packageJson.scripts.postinstall; | ||
|
||
//restore the script | ||
} else if (process.argv.includes('--post')) { | ||
packageJson.scripts.postinstall = fsExtra.readFileSync(cachePath, packageJson.scripts.postinstall).toString(); | ||
fsExtra.removeSync(cachePath); | ||
} | ||
|
||
fsExtra.outputJsonSync(packageJsonPath, packageJson, { spaces: 4 }); |
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
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
Oops, something went wrong.