Skip to content

Commit 7668f04

Browse files
committed
add test
1 parent 49cfe8a commit 7668f04

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- "7"
4+
before_script: cd note_client

note_client/test/mocha.opts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
--recursive
2+
--require babel-register
3+
--require babel-polyfill

note_client/test/model/page.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as assert from 'power-assert'
2+
import { Page } from 'model/page'
3+
4+
describe('Page:fromData', () => {
5+
it('one', () => {
6+
var result = Page.fromData({
7+
id: 123,
8+
title: 'テストタイトル',
9+
content: 'テスト本文'
10+
})
11+
assert.equal(result.id, 123)
12+
assert.equal(result.title, 'テストタイトル')
13+
assert.equal(result.content, 'テスト本文')
14+
})
15+
})

0 commit comments

Comments
 (0)