Skip to content

Commit

Permalink
Merge 80cc1e2 into c671bbd
Browse files Browse the repository at this point in the history
  • Loading branch information
juwara0 committed Feb 28, 2017
2 parents c671bbd + 80cc1e2 commit 7690bb3
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 32 deletions.
11 changes: 11 additions & 0 deletions .remarkrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": {
"lint": {
"list-item-indent": false,
"maximum-line-length": 119
}
},
"settings": {
"commonmark": true
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ deploy:
branch: master
condition: "$EMBER_TRY_SCENARIO = 'default'"
node: 'stable'
tags: false
tags: true
after_deploy:
- .travis/publish-gh-pages.sh
notifications:
Expand Down
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module.exports = {
if (this.options.babel.optional.indexOf('es7.decorators') === -1) {
this.options.babel.optional.push('es7.decorators')
}
// eslint-disable-next-line no-unused-expressions
this._super.init && this._super.init.apply(this, arguments)
},
included: function (app) {
Expand Down
14 changes: 3 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,9 @@
},
"scripts": {
"build": "ember build",
"lint": "lint-all-the-things",
"start": "ember server",
"test": "npm run lint && COVERAGE=true ember test",
"eslint": "eslint *.js addon app config tests",
"sass-lint": "sass-lint -q -v",
"md-lint": "remark *.md",
"lint": "npm run eslint && npm run sass-lint && npm run md-lint"
"test": "npm run lint && COVERAGE=true ember test"
},
"repository": "git@github.com:ciena-frost/ember-frost-navigation.git",
"engines": {
Expand Down Expand Up @@ -53,18 +50,13 @@
"ember-redux": "^1.0.0",
"ember-resolver": "^2.0.3",
"ember-sinon": "~0.5.0",
"ember-test-utils": "^1.8.0",
"ember-test-utils": "^1.10.7",
"ember-truth-helpers": "1.2.0",
"eslint": "^3.0.0",
"eslint-config-frost-standard": "^4.0.0",
"frost-guide-custom-routing": "0.0.4",
"liquid-fire": "~0.26.0",
"loader.js": "^4.0.1",
"redux": "3.6.0",
"redux-thunk": "2.1.0",
"remark-cli": "^2.0.0",
"remark-lint": "^5.1.0",
"sass-lint": "^1.0.0",
"svg4everybody": "^2.1.0"
},
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/components/nav-action-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ describe(test.label, function () {
hook='nav-action'
}}`)
$hook('nav-action').click()
expect(nav.performAction.called).to.be.true
expect(nav.performAction.called).to.equal(true)
})
})
2 changes: 1 addition & 1 deletion tests/integration/components/nav-route-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ describe(test.label, function () {
e({ctrlKey: true}),
e()
].forEach(e => $hook('nav-route').trigger(e))
expect(nav.dismiss.calledThrice).to.be.true
expect(nav.dismiss.calledThrice).to.equal(true)
})
})
2 changes: 1 addition & 1 deletion tests/integration/components/nav-section-actions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ describe(test.label, function () {
this.set('goBack', spy)
this.render(hbs`{{nav-section-actions goBack=goBack}}`)
this.$('.nav-section-header').click()
expect(spy.called).to.be.true
expect(spy.called).to.equal(true)
})
})
2 changes: 1 addition & 1 deletion tests/test-helper.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import resolver from './helpers/resolver'
import { setResolver } from 'ember-mocha'
import {setResolver} from 'ember-mocha'

setResolver(resolver)
1 change: 0 additions & 1 deletion tests/unit/components/nav-action-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ describe(test.label, function () {
let component = this.subject()
// renders the component on the page
this.render()
expect(component).to.be.ok
expect(component.getDefaultProps).to.be.a('array')
expect(this.$()).to.have.length(1)
})
Expand Down
1 change: 0 additions & 1 deletion tests/unit/components/nav-category-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ describe(test.label, function () {
let component = this.subject()
// renders the component on the page
this.render()
expect(component).to.be.ok
expect(component.getDefaultProps).to.be.a('array')

expect(this.$()).to.have.length(1)
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/components/nav-modal-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,14 @@ describe(test.label, function () {
this.render()
})
it('renders', function () {
expect(component).to.be.ok
expect(this.$()).to.have.length(1)
})
it('handles actions', function () {
;[
{
name: 'setView',
test () {
expect(component.get('showActions')).to.be.true
expect(component.get('showActions')).to.equal(true)
}
}
].forEach(e => {
Expand Down
1 change: 0 additions & 1 deletion tests/unit/components/nav-route-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ describe(test.label, function () {
let component = this.subject()
// renders the component on the page
this.render()
expect(component).to.be.ok
expect(component.getDefaultProps).to.be.a('array')

expect(this.$()).to.have.length(1)
Expand Down
1 change: 0 additions & 1 deletion tests/unit/components/nav-section-actions-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ describe(test.label, function () {
// renders the component on the page
component.set('goBack', function () {})
this.render()
expect(component).to.be.ok
expect(this.$()).to.have.length(1)
})
})
3 changes: 1 addition & 2 deletions tests/unit/components/nav-section-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,9 @@ describe(test.label, function () {

it('renders', function () {
// creates the component instance
let component = this.subject()
this.subject()
// renders the component on the page
this.render()
expect(component).to.be.ok
expect(this.$()).to.have.length(1)
})
})
14 changes: 6 additions & 8 deletions tests/unit/services/frost-navigation-test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {expect} from 'chai'
import Ember from 'ember'
const {A} = Ember
import {setupTest} from 'ember-mocha'
import {beforeEach, describe, it} from 'mocha'
import sinon from 'sinon'
Expand All @@ -13,18 +14,15 @@ describe('Unit / Service / frost-navigation', function () {
beforeEach(function () {
service = this.subject()
})
it('exists', function () {
expect(service).to.be.ok
})
it('adds categories correctly', function () {
service._registerCategory({
name: 'add new category'
})
expect(service.categories).to.not.be.empty
expect(service.categories.length).to.equal(1)
})
it('returns existing category', function () {
let name = 'existing category'
service.set('categories', Ember.A())
service.set('categories', A())
service.get('categories').pushObject({
name
})
Expand All @@ -49,13 +47,13 @@ describe('Unit / Service / frost-navigation', function () {
dismiss: true,
action: 'testAction'
})
expect(spy.called).to.be.true
expect(service.get('_activeCategory')).to.be.null
expect(spy.called).to.equal(true)
expect(service.get('_activeCategory')).to.equal(null)
})
it('transitions to a route', function () {
let spy = sinon.spy()
service.set('dismiss', spy)
service.transitionTo('index')
expect(spy.called).to.be.true
expect(spy.called).to.equal(true)
})
})

0 comments on commit 7690bb3

Please sign in to comment.