Merge pull request #492 from lared/bugfix/set-up-ajv-in-tests

fix(#473) add Ajv and node-fetch to the test runtime
This commit is contained in:
Anoop M D 2023-10-10 00:08:53 +05:30 committed by GitHub
commit c4a21e1089
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,13 +18,15 @@ const TestResults = require('../test-results');
const { cleanJson } = require('../utils');
// Inbuilt Library Support
const ajv = require('ajv');
const atob = require('atob');
const axios = require('axios');
const btoa = require('btoa');
const lodash = require('lodash');
const moment = require('moment');
const uuid = require('uuid');
const nanoid = require('nanoid');
const axios = require('axios');
const fetch = require('node-fetch');
const CryptoJS = require('crypto-js');
class TestRuntime {
@ -111,14 +113,16 @@ class TestRuntime {
punycode,
zlib,
// 3rd party libs
atob,
axios,
ajv,
btoa,
atob,
lodash,
moment,
uuid,
nanoid,
axios,
chai,
'node-fetch': fetch,
'crypto-js': CryptoJS,
...whitelistedModules,
fs: allowScriptFilesystemAccess ? fs : undefined