git ssb

0+

Piet / ssb-loomio



Tree: dbfe7b74a3adb5a6f94f01cd9a3f8fd4d696bd93

Files: dbfe7b74a3adb5a6f94f01cd9a3f8fd4d696bd93 / test / schema / pollTypes / chooseOne.js

411 bytesRaw
1var test = require('tape')
2var {create, validate} = require('../../../schema/pollTypes/chooseOne');
3
4test('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
10test('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