-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.test.js
35 lines (27 loc) · 1.1 KB
/
index.test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
////// STUDENTS: DO NOT MODIFY THIS FILE //////
////// STUDENTS: DO NOT MODIFY THIS FILE //////
////// STUDENTS: DO NOT MODIFY THIS FILE //////
////// STUDENTS: DO NOT MODIFY THIS FILE //////
////// STUDENTS: DO NOT MODIFY THIS FILE //////
/* eslint-env mocha */
if (typeof exports !== 'undefined') {
// IGNORE: Test/Env Detection Stuff //
// Node/Non-browser test env
// TODO: Add any json/data imports
var lukeSkywalker = require('../data/person-1.json')
// var leiaOrgana = require('../data/person-5.json')
// var obiWanKenobi = require('../data/person-10.json')
var chai = require('chai')
var {
getName,
// TODO: Add all functions to export/test here
} = require('../index.js')
}
var expect = chai.expect
// TODO: Add test `describe` blocks here
// Example:
describe('getName()', () => {
it('expected name for `Luke`', () => { expect(getName(lukeSkywalker)).to.eq(`Luke Skywalker`) })
// it('expected name for `Leia`', () => { expect(getName(leiaOrgana)).to.eq(`Leia Organa`) })
// it('expected name for `Obi-Wan`', () => { expect(getName(obiWanKenobi)).to.eq(`Obi-Wan Kenobi`) })
})