Commit 11d77c5543a6ea0a4c142559d79096b5db3bd0e1
Adds tests for chooseOne
Piet Geursen committed on 2/26/2018, 3:10:57 AMParent: f4dab21d95cabd1f4db3906fa99ea971a8672620
Files changed
test/schema/pollTypes/chooseOne.js | changed |
test/schema/pollTypes/chooseOne.js | ||
---|---|---|
@@ -1,6 +1,14 @@ | ||
1 | 1 … | var test = require('tape') |
2 … | +var {create, validate} = require('../../../schema/pollTypes/chooseOne'); | |
2 | 3 … | |
3 | -test('ok', function(t) { | |
4 | - t.pass() | |
4 … | +test('create and validate an invalid chooseOne poll', function(t) { | |
5 … | + var myPoll = create({choices:"how"}) | |
6 … | + t.false(validate(myPoll)) | |
5 | 7 … | t.end() |
6 | 8 … | }) |
9 … | + | |
10 … | +test('create and validate a valid chooseOne poll', function(t) { | |
11 … | + var myPoll = create({choices:["how","many", "food"]}) | |
12 … | + t.true(validate(myPoll)) | |
13 … | + t.end() | |
14 … | +}) |
Built with git-ssb-web