This repository was archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgruntfile.js
60 lines (58 loc) · 2 KB
/
gruntfile.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
module.exports = function (grunt) {
grunt.initConfig({
options: {
force: true,
dot: true // remove hidden files
},
// delete bundle dirs, compiled core test files, node_modules contents (keep dir)
clean: {
core: ['./src/JavaScriptSDK.Tests/Selenium/aicore.tests*', 'node_modules/*', 'dist-esm', 'browser', 'types', 'dist']
},
tslint: {
options: {
rulesDirectory: 'node_modules/tslint-microsoft-contrib',
},
files: {
src: ['./**/*.ts', '!./**/node_modules/**/*.ts', '!./JavaScriptSDK.Tests/**/*.ts'],
}
},
ts: {
options: {
comments: true
},
core: {
tsconfig: './tsconfig.json'
},
coretest: {
tsconfig: './src/JavaScriptSDK.Tests/tsconfig.json',
src: [
'./src/JavaScriptSDK.Tests/Selenium/ApplicationInsightsCore.Tests.ts',
'./src/JavaScriptSDK.Tests/Selenium/aitests.ts'
],
out: './src/JavaScriptSDK.Tests/Selenium/aicore.tests.js'
}
},
qunit: {
core: {
options: {
urls: [
'./src/JavaScriptSDK.Tests/Selenium/Tests.html'
],
timeout: 300 * 1000, // 5 min
console: false,
summaryOnly: true,
'--web-security': 'false'
}
}
}
});
grunt.event.on('qunit.testStart', function (name) {
grunt.log.ok('Running test: ' + name);
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks("grunt-ts");
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-tslint');
grunt.registerTask("core", ["ts:core"]);
grunt.registerTask("coretest", ["ts:core", "ts:coretest", "qunit:core"]);
};