feat: 초기 프로젝트 설정 및 룰.md 파일 추가
This commit is contained in:
26
api.hyungi.net/node_modules/vizion/test/unit/helper.test.js
generated
vendored
Normal file
26
api.hyungi.net/node_modules/vizion/test/unit/helper.test.js
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
var helper = require("../../lib/helper.js");
|
||||
var should = require("should");
|
||||
|
||||
describe('Helper', function () {
|
||||
|
||||
const fixt = {
|
||||
a : {
|
||||
b : {
|
||||
c : 'result'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
describe('.get', () => {
|
||||
should(helper.get(fixt, 'a.b.c')).eql('result')
|
||||
})
|
||||
|
||||
describe('.get null', () => {
|
||||
should(helper.get(null, 'a.b.c')).eql(null)
|
||||
})
|
||||
|
||||
describe('.get null', () => {
|
||||
should(helper.get(fixt, 'a.b.d')).eql(undefined)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user