Tests and Script
Script
Inbuilt Libraries

Inbuilt Libraries

Bruno supports CommonJS syntax require for importing libraries. ES Modules import/export are not supported at this time.

Here’s an example demonstrating how to use the chai library in Bruno:

const chai = require('chai');
 
const { expect } = chai;
 
function add(a, b) {
  return a + b;
}
 
const result = add(2, 3);
 
expect(result).to.equal(5);
 
console.log('Test passed!');

You can include this code in the pre-request script section of Bruno to test it out.

Below is the list of inbuilt libraries supported by Bruno.

⚠️

To use below inbuilt libraries in Bruno, you must be in Developer Mode.