ArianNexux / lbc-challenge01

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

lbc-challenge01

Requirements

  • NodeJS(v16 >) Installed

Installation

Install all depencies that is need in the project:

npm install

Testing

To test the function run the following command:

npm run test

Usage

To add more test case just change the param of function isABalancedString in the file index.spec.js

const { isABalancedString } = require("./index")

test("should be able to analyze if the string is balanced", () => {
    expect(isABalancedString("()[]{}")).toBe(true)
    expect(isABalancedString("([{}")).toBe(false)
})

About


Languages

Language:JavaScript 100.0%