Thanks for the additional info. Version 1.7.0 of VisitorAPI.js is really old and no longer supported since we are at version 3.3.0 as of today. I would recommend upgrading to a newer library and ideally use the built in Launch Extension for "Experience Cloud ID Service." Then you can just use Launch to keep it up to date goting forward. However if your use case does not allow for that, you should still be able to create a "Custom Code" action in a Launch rule. Just choose "HTML" as your lanuage and then click on "Open Editor" and just include the script tags you need.
In your example above, the test variable would just be a String however and not actually load the external library unless you append it to the DOM or do something with it. But if that's what you want to have happen, then just escape the closing slash and Launch should not have any syntax errors. This worked for me:
var test = '<script src="/js/VisitorAPI_1_7_0.js"><\/script>';
We will probably need more information to help out on this. Info like whether you are using the built in "Experience Cloud ID Service" extension or if you are doing it manually. Also if you can provide more details like maybe a link to the property where you are seeing this and maybe the Launch propery, it would be helpful.