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

View File

@@ -3,7 +3,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
function StopExecutionError() {}
StopExecutionError.prototype = new Error();
j$.StopExecutionError = StopExecutionError;
j$.private.StopExecutionError = StopExecutionError;
function once(fn, onTwice) {
let called = false;
@@ -56,7 +56,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
};
this.onException = attrs.onException || emptyFn;
this.onMultipleDone = attrs.onMultipleDone || fallbackOnMultipleDone;
this.userContext = attrs.userContext || new j$.UserContext();
this.userContext = attrs.userContext || new j$.private.UserContext();
this.timeout = attrs.timeout || {
setTimeout: setTimeout,
clearTimeout: clearTimeout
@@ -67,7 +67,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
popListener: emptyFn
};
const SkipPolicy = attrs.SkipPolicy || j$.NeverSkipPolicy;
const SkipPolicy = attrs.SkipPolicy || j$.private.NeverSkipPolicy;
this.skipPolicy_ = new SkipPolicy(this.queueableFns);
this.errored_ = false;
@@ -190,7 +190,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
if (queueableFn.fn.length === 0) {
maybeThenable = queueableFn.fn.call(this.userContext);
if (maybeThenable && j$.isFunction_(maybeThenable.then)) {
if (maybeThenable && j$.private.isFunction(maybeThenable.then)) {
maybeThenable.then(
wrapInPromiseResolutionHandler(next),
onPromiseRejection
@@ -260,11 +260,11 @@ getJasmineRequireObj().QueueRunner = function(j$) {
};
QueueRunner.prototype.diagnoseConflictingAsync_ = function(fn, retval) {
if (retval && j$.isFunction_(retval.then)) {
if (retval && j$.private.isFunction(retval.then)) {
// Issue a warning that matches the user's code.
// Omit the stack trace because there's almost certainly no user code
// on the stack at this point.
if (j$.isAsyncFunction_(fn)) {
if (j$.private.isAsyncFunction(fn)) {
this.onException(
new Error(
'An asynchronous before/it/after ' +
@@ -288,7 +288,7 @@ getJasmineRequireObj().QueueRunner = function(j$) {
function wrapInPromiseResolutionHandler(fn) {
return function(maybeArg) {
if (j$.isError_(maybeArg)) {
if (j$.private.isError(maybeArg)) {
fn(maybeArg);
} else {
fn();