AjiTae
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
1 deletions
-
src/core/util/props.js
-
test/unit/features/options/props.spec.js
|
|
@ -147,7 +147,7 @@ function assertProp ( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
const simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/ |
|
|
|
const simpleCheckRE = /^(String|Number|Boolean|Function|Symbol|BigInt)$/ |
|
|
|
|
|
|
|
function assertType (value: any, type: Function, vm: ?Component): { |
|
|
|
valid: boolean; |
|
|
|
|
|
@ -252,6 +252,16 @@ describe('Options props', () => { |
|
|
|
expect('Expected String, Number, got Symbol').toHaveBeenWarned() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
if (typeof BigInt !== 'undefined') { |
|
|
|
/* global BigInt */ |
|
|
|
it('bigint', () => { |
|
|
|
makeInstance(BigInt(100), BigInt) |
|
|
|
expect(console.error.calls.count()).toBe(0) |
|
|
|
makeInstance({}, BigInt) |
|
|
|
expect('Expected BigInt, got Object').toHaveBeenWarned() |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
it('custom constructor', () => { |
|
|
|
function Class () {} |
|
|
|