IoTIFY supports importing additional libraries and scripts to make your life easier
In a lot of cases, you may require some functionality in your code which can be easily solved by importing an existing library or a script. Writing custom logic for everything can be time-consuming and may not always be helpful. Hence, with IoTIFY, you can import any NPM package or a custom script you can find online to help you write your code easily.
To import any library or a custom script, go to the Library tab and here you can add up to 5 libraries and scripts in total.
Import As: Name of the module object that will be used as a kind of namespace when referring to the imported library.
Type: Select whether you are importing an NPM package or a custom script.
NPM Package or Public node script: The name of a valid NPM package or an URL to the custom script. When a valid package name or URL is given the icon beside the input turns into a tick mark. This means that it is a valid package and can be imported into the test.
To delete any of the packages, you can click on the cross icon at the right end of the library.
You can only import up to a total of 5 additional packages into the tests.
Many commonly used libraries are already inbuilt into IoTIFY, which you do not need to separately import. We will look into all the inbuilt libraries shortly.