docs: update outdated runTestSource trigger

pull/5676/head
vandyck.lai 2 weeks ago committed by GitHub
parent fb8f47772b
commit bba5d0efd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      libs/remix-tests/README.md

@ -237,9 +237,12 @@ remixTests.runTest (testName: string, testObject: any, contractDetails: Compiled
* `failureNum` - number of failing tests
* `timePassed` - time it took for all the tests to run (in seconds)
Running a set of tests given the sourcecode:
Run a set of tests given the sourcecode:
```Javascript
remixTests.runTestSources(contractSources: SrcIfc, versionUrl: string, usingWorker: boolean, testCallback: Function, resultCallback: Function, finalCallback: any, importFileCb: Function, opts: Options);
// Initialize UnitTestRunner
const runner = new remixTests.UnitTestRunner()
runner.runTestSources(contractSources: SrcIfc, compilerConfig: CompilerConfiguration, testCallback: Function, resultCallback: Function, finalCallback: any, importFileCb: Function);
```
<em>Params:-</em>
1. `contractSources` - Contract sources
@ -261,7 +264,6 @@ remixTests.runTestSources(contractSources: SrcIfc, versionUrl: string, usingWork
5. `finalCallback(err)` - called when all tests finish running.
6. `importCb(url, cb)` - Callback to resolve imported files
7. `opts` - Custom options
For more details, see parameters' type definitions [here](src/types.ts).

Loading…
Cancel
Save