Deprecated access to non-public members in specs and suites returned from it(), describe(), etc.

This commit is contained in:
Steve Gravrock
2021-07-29 21:28:47 -07:00
parent 2a2a671b65
commit 799d9897fd
6 changed files with 131 additions and 28 deletions

View File

@@ -550,10 +550,17 @@ describe('spec running', function() {
var pendingSpec,
suite = env.describe('default current suite', function() {
pendingSpec = env.it('I am a pending spec');
});
}),
reporter = jasmine.createSpyObj('reporter', ['specDone']);
env.addReporter(reporter);
env.execute(null, function() {
expect(pendingSpec.status()).toBe('pending');
expect(reporter.specDone).toHaveBeenCalledWith(
jasmine.objectContaining({
status: 'pending'
})
);
done();
});
});