From da34f80dc9dc33d297d062985f237266ababeb25 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Fri, 6 Dec 2019 12:40:17 +0700 Subject: [PATCH] updated readme --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7dc20d..8dad787 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,53 @@ $ npm i boolerjs --save ## Example ```js +const assert = require('assert'); const booler = require('boolerjs') -console.log(booler('f')) // return false -console.log(booler('t')) // return true +it('booler will be pass it to equal true', () => { + assert.equal(true, booler(true)); +}) + +it('booler will be pass it to equal True', () => { + assert.equal(true, booler('True')); +}) + +it(`booler will be pass it to equal 'true'`, () => { + assert.equal(true, booler('true')); +}) + +it(`booler will be pass it to equal 't'`, () => { + assert.equal(true, booler('t')); +}) + +it(`booler will be pass it to equal '1'`, () => { + assert.equal(true, booler('1')); +}) + +it('booler will be pass it to equal 1', () => { + assert.equal(true, booler(1)); +}) + +it('booler will be pass it to equal false', () => { + assert.equal(false, booler(false)); +}) + +it(`booler will be pass it to equal 'false'`, () => { + assert.equal(false, booler('false')); +}) + +it(`booler will be pass it to equal 'f'`, () => { + assert.equal(false, booler('f')); +}) + +it(`booler will be pass it to equal '0'`, () => { + assert.equal(false, booler(0)); +}) + +it('booler will be pass it to equal 0', () => { + assert.equal(false, booler(0)); +}) + ``` ## Run Test