Skip to content

Modify test infrastructure and grunt tasks #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 14 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
var util = require("util");

var now = new Date().toISOString();

function shallowCopy(obj) {
Expand All @@ -14,6 +12,13 @@ var travis = process.env["TRAVIS"];
var buildNumber = process.env["TRAVIS_BUILD_NUMBER"] || process.env["BUILD_NUMBER"] || "non-ci";

module.exports = function(grunt) {
var path = require("path");
var commonLibNodeModules = path.join("lib", "common", "node_modules");
if(require("fs").existsSync(commonLibNodeModules)) {
grunt.file.delete(commonLibNodeModules);
}
grunt.file.write(path.join("lib", "common", ".d.ts"), "");

grunt.initConfig({
copyPackageTo: process.env["CopyPackageTo"] || ".",

Expand All @@ -22,29 +27,29 @@ module.exports = function(grunt) {
dateString: now.substr(0, now.indexOf("T")),

pkg: grunt.file.readJSON("package.json"),

ts: {
options: {
target: 'es5',
module: 'commonjs',
sourceMap: true,
declaration: false,
removeComments: false,
noImplicitAny: true
noImplicitAny: true,
experimentalDecorators: true
},

devlib: {
src: ["lib/**/*.ts"],
src: ["lib/**/*.ts", "!lib/common/node_modules/**/*.ts"],
reference: "lib/.d.ts"
},

devall: {
src: ["lib/**/*.ts", "test/**/*.ts"],
src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts", "lib/common/test/unit-tests/**/*.ts", "definitions/**/*.ts", "!lib/common/test/.d.ts"],
reference: "lib/.d.ts"
},

release_build: {
src: ["lib/**/*.ts", "test/**/*.ts"],
src: ["lib/**/*.ts", "test/**/*.ts", "!lib/common/node_modules/**/*.ts"],
reference: "lib/.d.ts",
options: {
sourceMap: false,
Expand All @@ -55,7 +60,7 @@ module.exports = function(grunt) {

watch: {
devall: {
files: ["lib/**/*.ts", 'test/**/*.ts'],
files: ["lib/**/*.ts", 'test/**/*.ts', "!lib/common/node_modules/**/*.ts"],
tasks: [
'ts:devall',
'shell:npm_test'
Expand Down Expand Up @@ -105,7 +110,7 @@ module.exports = function(grunt) {
},

clean: {
src: ["test/**/*.js*", "lib/**/*.js*", "!lib/common/vendor/*.js", "*.tgz"]
src: ["test/**/*.js*", "lib/**/*.js*", "!lib/common/vendor/*.js", "!lib/common/**/*.json", "!lib/common/Gruntfile.js", "!lib/common/node_modules/**/*", "!lib/common/hooks/**/*.js", "!lib/common/bin/*.js", "*.tgz"]
}
});

Expand Down
2 changes: 1 addition & 1 deletion lib/common
Submodule common updated 89 files
+6 −0 .gitignore
+172 −0 Gruntfile.js
+271 −0 README.md
+5 −0 bin/common-lib.js
+88 −87 bootstrap.ts
+1 −1 child-process.ts
+1 −1 command-params.ts
+7 −7 commands/analytics.ts
+1 −1 commands/autocompletion.ts
+2 −2 commands/device/device-log-stream.ts
+2 −2 commands/device/get-file.ts
+2 −2 commands/device/list-applications.ts
+2 −2 commands/device/list-devices.ts
+2 −2 commands/device/list-files.ts
+2 −2 commands/device/put-file.ts
+2 −2 commands/device/run-application.ts
+2 −3 commands/device/stop-application.ts
+2 −2 commands/device/uninstall-application.ts
+2 −2 commands/doctor.ts
+2 −2 commands/help.ts
+2 −2 commands/post-install.ts
+2 −2 commands/preuninstall.ts
+10 −0 common-lib.ts
+1 −1 config-base.ts
+2 −0 declarations.d.ts
+39 −0 decorators.ts
+711 −0 definitions/bluebird.d.ts
+1 −1 definitions/mobile.d.ts
+1 −1 definitions/node-ffi.d.ts
+2 −0 definitions/yok.d.ts
+4 −10 dispatchers.ts
+1 −1 errors.ts
+16 −0 fiber-bootstrap.ts
+7 −4 file-system.ts
+1 −1 helpers.ts
+1 −1 host-info.ts
+1 −1 http-client.ts
+2 −2 logger.ts
+2 −2 mobile/android/android-application-manager.ts
+1 −1 mobile/android/android-debug-bridge.ts
+1 −1 mobile/android/android-device-file-system.ts
+2 −2 mobile/android/android-device.ts
+20 −5 mobile/android/android-emulator-services.ts
+1 −1 mobile/android/android-livesync-service.ts
+2 −2 mobile/android/logcat-helper.ts
+1 −1 mobile/device-app-data/device-app-data-base.ts
+2 −2 mobile/device-app-data/device-app-data-factory.ts
+1 −1 mobile/device-platforms-constants.ts
+2 −2 mobile/ios/ios-application-manager.ts
+2 −2 mobile/ios/ios-core.ts
+3 −3 mobile/ios/ios-device-file-system.ts
+2 −2 mobile/ios/ios-device.ts
+2 −2 mobile/ios/ios-emulator-services.ts
+1 −1 mobile/ios/ios-proxy-services.ts
+1 −1 mobile/local-to-device-path-data-factory.ts
+2 −3 mobile/mobile-core/device-discovery.ts
+2 −1 mobile/mobile-core/devices-services.ts
+1 −1 mobile/mobile-helper.ts
+1 −1 mobile/wp8/wp8-emulator-services.ts
+1 −1 opener.ts
+5 −3 options.ts
+90 −0 package.json
+2 −2 project-helper.ts
+12 −8 prompter.ts
+1 −1 properties-parser.ts
+1 −1 queue.ts
+2 −2 services/analytics-service.ts
+1 −1 services/auto-completion-service.ts
+1 −1 services/cancellation.ts
+2 −2 services/commands-service.ts
+1 −1 services/dynamic-help-service.ts
+1 −1 services/hooks-service.ts
+1 −1 services/html-help-service.ts
+1 −1 services/micro-templating-service.ts
+1 −1 services/typescript-compilation-service.ts
+2 −2 services/usb-livesync-service-base.ts
+1 −1 services/user-settings-service.ts
+1 −1 static-config-base.ts
+4 −1 sysinfo.ts
+3 −0 test/.d.ts
+283 −0 test/definitions/chai.d.ts
+87 −0 test/definitions/mocha.d.ts
+27 −0 test/test-bootstrap.ts
+141 −0 test/unit-tests/decorators.ts
+161 −0 test/unit-tests/yok.ts
+1 −1 validators/iTunes-validator.ts
+1 −1 validators/project-name-validator.ts
+1 −1 validators/validation-result.ts
+35 −4 yok.ts
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"main": "./lib/nativescript-cli.js",
"scripts": {
"test": "node_modules\\.bin\\_mocha --ui mocha-fibers --recursive --reporter spec --require test/test-bootstrap.js --timeout 60000 test/",
"test": "node_modules\\.bin\\_mocha --ui mocha-fibers --recursive --reporter spec --require test/test-bootstrap.js --timeout 60000 test/ lib/common/test/unit-tests",
"postinstall": "node postinstall.js",
"preuninstall": "node preuninstall.js"
},
Expand All @@ -24,6 +24,7 @@
"mobile"
],
"dependencies": {
"bluebird": "2.9.34",
"bplist-parser": "0.1.0",
"broccoli": "0.16.4",
"broccoli-funnel": "0.2.3",
Expand Down Expand Up @@ -81,12 +82,12 @@
"devDependencies": {
"chai": "1.8.x",
"grunt": "0.4.5",
"grunt-contrib-clean": "0.5.0",
"grunt-contrib-copy": "0.5.0",
"grunt-contrib-watch": "0.5.3",
"grunt-shell": "0.6.4",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-copy": "0.8.0",
"grunt-contrib-watch": "0.6.1",
"grunt-shell": "1.1.2",
"grunt-ts": "4.2.0",
"mocha": "1.21.4",
"mocha": "2.2.5",
"mocha-fibers": "https://github.com/Icenium/mocha-fibers/tarball/master",
"should": "7.0.2",
"typescript": "1.5.3"
Expand Down
2 changes: 0 additions & 2 deletions test/.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/// <reference path="../lib/.d.ts" />
/// <reference path="./definitions/mocha.d.ts" />
/// <reference path="./definitions/should.d.ts" />

283 changes: 0 additions & 283 deletions test/definitions/chai.d.ts

This file was deleted.

Loading