Move private APIs to private namespace

Fixes #2078
This commit is contained in:
Steve Gravrock
2025-09-27 13:21:09 -07:00
parent fbec066837
commit 168ff0a751
183 changed files with 2627 additions and 2459 deletions
+3
View File
@@ -3,4 +3,7 @@
// to the Jasmine source files (and not jasmine.js). So re-require
window.jasmineUnderTest = jasmineRequire.core(jasmineRequire);
jasmineRequire.html(jasmineUnderTest);
// Alias the private namespace so tests can be less verbose
window.privateUnderTest = window.jasmineUnderTest.private;
})();
+2 -2
View File
@@ -42,9 +42,9 @@
: 'Expected runnable "' +
fullName +
'" to have failures ' +
jasmine.basicPrettyPrinter_(expectedFailures) +
jasmine.private.basicPrettyPrinter(expectedFailures) +
' but it had ' +
jasmine.basicPrettyPrinter_(foundFailures)
jasmine.private.basicPrettyPrinter(foundFailures)
};
}
};
@@ -24,4 +24,7 @@
global.jasmineUnderTest = jasmineUnderTestRequire.core(
jasmineUnderTestRequire
);
// Alias the private namespace so tests can be less verbose
global.privateUnderTest = global.jasmineUnderTest.private;
})();
+3 -3
View File
@@ -1,8 +1,8 @@
beforeEach(function() {
// env is stateful. Ensure that it, and its global error event listeners,
// do not leak between tests.
if (jasmineUnderTest.currentEnv_) {
jasmineUnderTest.currentEnv_.cleanup_();
jasmineUnderTest.currentEnv_ = null;
if (privateUnderTest.currentEnv_) {
privateUnderTest.currentEnv_.cleanup_();
privateUnderTest.currentEnv_ = null;
}
});