✅ fix test case about window reference binding (#1529)
This commit is contained in:
parent
4eee5220e3
commit
d9810da3ef
|
|
@ -349,8 +349,7 @@ it('should return true while [[GetPrototypeOf]] invoked by proxy object', () =>
|
|||
});
|
||||
|
||||
it('native window function calling should always be bound with window', () => {
|
||||
const { proxy } = new ProxySandbox('mustBeBoundWithWindowReference');
|
||||
proxy.nativeWindowFunction = function nativeWindowFunction(this: any) {
|
||||
window.nativeWindowFunction = function nativeWindowFunction(this: any) {
|
||||
if (this !== undefined && this !== window) {
|
||||
throw new Error('Illegal Invocation!');
|
||||
}
|
||||
|
|
@ -358,5 +357,6 @@ it('native window function calling should always be bound with window', () => {
|
|||
return 'success';
|
||||
};
|
||||
|
||||
const { proxy } = new ProxySandbox('mustBeBoundWithWindowReference');
|
||||
expect(proxy.nativeWindowFunction()).toBe('success');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user