Skip to content

Commit ca2137d

Browse files
committedMar 21, 2014
test for this.$data access in the created hook
1 parent 6980f59 commit ca2137d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎test/unit/specs/api.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -923,10 +923,15 @@ describe('API', function () {
923923

924924
describe('created', function () {
925925

926-
it('should be called before compile', function () {
926+
it('should be called before compile and give access to all vm properties', function () {
927927

928928
var called = false,
929929
Test = Vue.extend({ created: function () {
930+
assert.ok(this.$data)
931+
assert.ok(this.$el)
932+
assert.ok(this.$)
933+
assert.ok(this.$compiler)
934+
assert.ok(this.$root)
930935
assert.ok(this.$options.ok)
931936
called = true
932937
}})

0 commit comments

Comments
 (0)
Please sign in to comment.