Skip to content

Commit

Permalink
fixed: closes #2369 and updated dev dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Jun 7, 2017
1 parent e9be63e commit 486e520
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 12 deletions.
18 changes: 9 additions & 9 deletions package.json
Expand Up @@ -46,41 +46,41 @@
],
"dependencies": {
"riot-cli": "^3.0.2",
"riot-compiler": "^3.2.2",
"riot-compiler": "^3.2.3",
"riot-observable": "^3.0.0",
"riot-tmpl": "^3.0.5",
"riot-tmpl": "^3.0.8",
"simple-dom": "0.3.2",
"simple-html-tokenizer": "^0.4.1"
},
"devDependencies": {
"benchmark": "^2.1.4",
"chai": "^3.5.0",
"cheerio": "^0.22.0",
"chai": "^4.0.0",
"cheerio": "^1.0.0-rc.1",
"chokidar-cli": "^1.2.0",
"coveralls": "^2.13.1",
"eslint": "^3.19.0",
"eslint-config-riot": "^1.0.0",
"glob": "^7.1.1",
"glob": "^7.1.2",
"istanbul": "^0.4.5",
"jsdom": "^10.1.0",
"jsdom": "^11.0.0",
"karma": "^1.7.0",
"karma-chrome-launcher": "^2.1.1",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-rollup-preprocessor": "^4.0.0",
"karma-sauce-launcher": "^1.1.0",
"mocha": "^3.3.0",
"mocha": "^3.4.2",
"phantomjs-prebuilt": "^2.1.14",
"rollup": "^0.41.6",
"rollup-plugin-alias": "1.3.1",
"rollup-plugin-buble": "^0.15.0",
"rollup-plugin-commonjs": "^8.0.2",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-riot": "^1.1.0",
"sinon": "^2.2.0",
"sinon": "^2.3.2",
"sinon-chai": "^2.10.0",
"uglify-js": "^3.0.4"
"uglify-js": "^3.0.10"
},
"preferGlobal": true,
"files": [
Expand Down
10 changes: 10 additions & 0 deletions test/specs/browser/compiler/compiler.spec.js
Expand Up @@ -6,6 +6,8 @@ import {
getRiotStyles
} from '../../../helpers/index'

import '../../../tag/bug-2369.tag'


describe('Riot compiler', function() {

Expand Down Expand Up @@ -148,4 +150,12 @@ describe('Riot compiler', function() {
tag.unmount()
})

it('tags containing regex get properly compiled', function() {
injectHTML('<bug-2369></bug-2369>')
const tag = riot.mount('bug-2369')[0]

expect(tag.root).to.be.ok

tag.unmount()
})
})
6 changes: 3 additions & 3 deletions test/specs/browser/riot/if.spec.js
Expand Up @@ -95,9 +95,9 @@ describe('Riot if', function() {

tag.update({cond: true, items: ['third']})

expect(tag.refs.first).to.be.an.instanceof(HTMLElement)
expect(tag.refs.second).to.be.an.instanceof(HTMLElement)
expect(tag.refs.third).to.be.an.instanceof(HTMLElement)
expect(tag.refs.first).to.be.ok
expect(tag.refs.second).to.be.ok
expect(tag.refs.third).to.be.ok

tag.update({cond: false, items: []})

Expand Down
10 changes: 10 additions & 0 deletions test/tag/bug-2369.tag
@@ -0,0 +1,10 @@
<bug-2369>
<h1>{ getSpaceName(message) }</h1>

<script>
this.message = 'display/example/stuff'
this.getSpaceName = function(link) {
return link.match(/display\/(\w+)\//)[1]
}
</script>
</bug-2369>

0 comments on commit 486e520

Please sign in to comment.