- NodeJS(v16 >) Installed
Install all depencies that is need in the project:
npm install
To test the function run the following command:
npm run test
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)
})