-
Notifications
You must be signed in to change notification settings - Fork 3
/
SuiteCloudJestStubs.js
61 lines (58 loc) · 1.37 KB
/
SuiteCloudJestStubs.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
const customStubMap = {
log: 'log',
util: 'util',
runtime: 'runtime',
url: 'url',
record: 'record',
action: 'action',
auth: 'auth',
cache: 'cache',
certificateControl: 'certificateControl',
compress: 'compress',
config: 'config',
crypto: 'crypto',
certificate: 'crypto/certificate',
currency: 'currency',
currentRecord: 'currentRecord',
dataset: 'dataset',
email: 'email',
encode: 'encode',
error: 'error',
file: 'file',
format: 'format',
i18n: 'format/i18n',
http: 'http',
https: 'https',
clientCertificate: 'https/clientCertificate',
keyControl: 'keyControl',
piremoval: 'piremoval',
plugin: 'plugin',
portlet: 'portlet',
query: 'query',
recordContext: 'recordContext',
redirect: 'redirect',
render: 'render',
search: 'search',
sftp: 'sftp',
sso: 'sso',
task: 'task',
recognition: 'task/accounting/recognition',
transaction: 'transaction',
translation: 'translation',
dialog: 'ui/dialog',
message: 'ui/message',
serverWidget: 'ui/serverWidget',
workbook: 'workbook',
workflow: 'workflow',
xml: 'xml'
}
const CORE_STUBS_PATH = 'suitecloud-unit-testing-stubs/stubs'
const CORE_STUBS = Object.keys(customStubMap).map((filename) => {
return {
module: `N/${customStubMap[filename]}`,
path: `<rootDir>/node_modules/${CORE_STUBS_PATH}/${filename}.js`
}
});
module.exports = {
customStubs: CORE_STUBS,
}