Improve wrapper function and parameter naming

This commit is contained in:
Elliot Nelson
2020-02-06 10:29:02 -05:00
parent 9febe3159d
commit bf4694333c
3 changed files with 36 additions and 30 deletions

View File

@@ -822,6 +822,12 @@ describe("Env integration", function() {
expect(result.foo).toEqual('hello world');
}).not.toThrow();
expect(function() {
var result = new spy('passing', 'extra', 'arguments', 'to', 'constructor');
expect(result instanceof MyClass).toBeTruthy();
expect(result.foo).toEqual('passing');
}).not.toThrow();
expect(function() {
spy('hello world');
}).toThrowError('You must use the new keyword.');
@@ -840,8 +846,8 @@ describe("Env integration", function() {
env.allowRespy(true);
env.addReporter({ jasmineDone: done });
env.describe('test suite', function(){
env.it('spec 0', function(){
env.describe('test suite', function() {
env.it('spec 0', function() {
env.spyOn(foo,'bar');
var error = null;