Skip to content

Commit 4bcf4b0

Browse files
committed
test(ssr-string.spec.js): should not warn for Date prop when it comes from another context
1 parent 515467a commit 4bcf4b0

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/ssr/ssr-string.spec.js

+14
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,20 @@ describe('SSR: renderToString', () => {
16661666
done()
16671667
})
16681668
})
1669+
1670+
it('should not warn for Date prop when it comes from another context', done => {
1671+
const date = VM.runInNewContext('new Date()')
1672+
new Vue({
1673+
props: {
1674+
date: Date,
1675+
},
1676+
propsData: {
1677+
date
1678+
}
1679+
})
1680+
expect('Invalid prop: type check failed for prop "date". Expected Date, got Date').not.toHaveBeenWarned()
1681+
done()
1682+
})
16691683
})
16701684

16711685
function renderVmWithOptions (options, cb) {

0 commit comments

Comments
 (0)