MCPcopy Index your code
hub / github.com/ampproject/amphtml / initializeTestConstructs

Function initializeTestConstructs

testing/init-tests-helpers.js:76–91  ·  view source on GitHub ↗

* Initializes the constructs with which all test cases are authored.

()

Source from the content-addressed store, hash-verified

74 * Initializes the constructs with which all test cases are authored.
75 */
76function initializeTestConstructs() {
77 // Allow Mocha's it() to call yield and allow pending promises to resolve.
78 installYieldIt(it);
79
80 // Make Mocha's describe() and it() globally configurable.
81 describe.configure = () => new TestConfig(describe);
82 it.configure = () => new TestConfig(it);
83
84 // Make AMP's custom describes() globally available.
85 global.describes = describes;
86
87 // Set up Mocha's global setup / clean up functions.
88 before(overrideSkipTest);
89 beforeEach(setupTestcase);
90 afterEach(cleanupTestcase);
91}
92
93/**
94 * Overrides AMP.extension() so that extension installation is buffered and

Callers 1

initializeTestsFunction · 0.85

Calls 3

installYieldItFunction · 0.90
beforeEachFunction · 0.85
afterEachFunction · 0.85

Tested by

no test coverage detected