Skip to content

Commit

Permalink
Merge branch 'feature/pragma-specs' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Swizz committed Jan 14, 2017
2 parents 9f18615 + 1b28f83 commit 6d0491e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const sanitizeChilds = (children) => {

}

export const createElement = (type, props={}, ...children) => {
export const createElement = (type, props, ...children) => {

return h(type, sanitizeProps(props), sanitizeChilds(children))

Expand Down
8 changes: 8 additions & 0 deletions test/pragma-specs/vnode-attributes/actual.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

import Snabbdom from '../../../src/index'

export default () => {

return Snabbdom.createElement('div', { attr1: 1, attr2: 2})

}
8 changes: 8 additions & 0 deletions test/pragma-specs/vnode-attributes/expected.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

import h from 'snabbdom/h'

export default () => {

return h('div', { attr1: 1, attr2: 2}, [])

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import Snabbdom from '../../../src/index'

export default () => {

return Snabbdom.createElement('div', null, "Hello World")
return Snabbdom.createElement('div', null)

}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import h from 'snabbdom/h'

export default () => {

return h('div', "Hello World")
return h('div', {}, [])

}
2 changes: 1 addition & 1 deletion test/pragma-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import test from 'ava'
import path from 'path'
import fs from 'fs'

const fixturesDir = path.join(__dirname, 'pragma-test')
const fixturesDir = path.join(__dirname, 'pragma-specs')

fs.readdirSync(fixturesDir).map( caseName => {

Expand Down

0 comments on commit 6d0491e

Please sign in to comment.