Files: dbfe7b74a3adb5a6f94f01cd9a3f8fd4d696bd93 / test / schema / pollTypes / chooseOne.js
411 bytesRaw
1 | var test = require('tape') |
2 | var {create, validate} = require('../../../schema/pollTypes/chooseOne'); |
3 | |
4 | test('create and validate an invalid chooseOne poll', function(t) { |
5 | var myPoll = create({choices:"how"}) |
6 | t.false(validate(myPoll)) |
7 | t.end() |
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 | }) |
15 |
Built with git-ssb-web