local i=require("\064\112\107\103\047\064\106\115\100\111\116\108\117\097\047\106\101\115\116-\103\108\111\098\097\108\115")local J=require("\046\046\047\098\111\111\108\101\097\110")local d=i.expect local k=i.it local H=i.beforeAll local l=20 local F H(function()F=J(Random.new())end)k("\114\101\116\117\114\110\115 \097 \098\111\111\108\101\097\110 \119\104\101\110 \099\097\108\108\101\100",function()for i=1,l,1 do(d(F())).toEqual(d.any("\098\111\111\108\101\097\110"))end end)k("\114\101\116\117\114\110\115 \097 \098\111\111\108\101\097\110 \119\104\101\110 \099\097\108\108\101\100 \119\105\116\104 \097 \099\104\097\110\099\101",function()for i=1,l,1 do(d(F(.1))).toEqual(d.any("\098\111\111\108\101\097\110"))end end)
local JestGlobals = require('@pkg/@jsdotlua/jest-globals')

local createBoolean = require('../boolean')

local expect = JestGlobals.expect
local it = JestGlobals.it
local beforeAll = JestGlobals.beforeAll

local FUZZ_COUNT = 20

local generator

beforeAll(function()
    generator = createBoolean(Random.new())
end)

it('returns a boolean when called', function()
    for _ = 1, FUZZ_COUNT do
        expect(generator()).toEqual(expect.any('boolean'))
    end
end)

it('returns a boolean when called with a chance', function()
    for _ = 1, FUZZ_COUNT do
        expect(generator(0.1)).toEqual(expect.any('boolean'))
    end
end)
