()
| 1840 | } |
| 1841 | |
| 1842 | async run() { |
| 1843 | this.computeInheritedHooks(); |
| 1844 | const hookArgs = this.getRunArgs(); |
| 1845 | |
| 1846 | let stopPromise; |
| 1847 | const after = runOnce(() => this.runHook('after', hookArgs), kRunOnceOptions); |
| 1848 | try { |
| 1849 | this.parent.activeSubtests++; |
| 1850 | await this.buildSuite; |
| 1851 | this.startTime = hrtime(); |
| 1852 | |
| 1853 | if (this[kShouldAbort]()) { |
| 1854 | this.subtests = []; |
| 1855 | this.postRun(); |
| 1856 | return; |
| 1857 | } |
| 1858 | |
| 1859 | if (this.parent.hooks.before.length > 0) { |
| 1860 | await this.parent.runHook('before', this.parent.getRunArgs()); |
| 1861 | } |
| 1862 | |
| 1863 | await this.runHook('before', hookArgs); |
| 1864 | |
| 1865 | stopPromise = stopTest(this.timeout, this.signal); |
| 1866 | const subtests = this.skipped || this.error ? [] : this.subtests; |
| 1867 | const promise = SafePromiseAll(subtests, (subtests) => subtests.start()); |
| 1868 | |
| 1869 | await SafePromiseRace([promise, stopPromise]); |
| 1870 | await after(); |
| 1871 | |
| 1872 | this.pass(); |
| 1873 | } catch (err) { |
| 1874 | try { await after(); } catch { /* suite is already failing */ } |
| 1875 | if (isTestFailureError(err)) { |
| 1876 | this.fail(err); |
| 1877 | } else { |
| 1878 | this.fail(new ERR_TEST_FAILURE(err, kTestCodeFailure)); |
| 1879 | } |
| 1880 | } finally { |
| 1881 | stopPromise?.[SymbolDispose](); |
| 1882 | this.#publishSuiteEnd(); |
| 1883 | } |
| 1884 | |
| 1885 | this.postRun(); |
| 1886 | } |
| 1887 | } |
| 1888 | |
| 1889 | function getFullName(test) { |
nothing calls this directly
no test coverage detected