Skip to content

Commit

Permalink
Separate qunitjs tests with and without WebRTC. Make "grunt test" to …
Browse files Browse the repository at this point in the history
…run "grunt testNoWebRTC".
  • Loading branch information
ibc committed Feb 13, 2013
1 parent e10872a commit b0603e3
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 38 deletions.
69 changes: 36 additions & 33 deletions grunt.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,53 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: "/*! jsSIP v@<%= pkg.version %> jssip.net | jssip.net/license */"
banner: '/*! jsSIP v@<%= pkg.version %> jssip.net | jssip.net/license */'
},
lint: {
dist: "dist/<%= pkg.name %>-<%= pkg.version %>.js",
grunt: "grunt.js"
dist: 'dist/<%= pkg.name %>-<%= pkg.version %>.js',
grunt: 'grunt.js'
},
concat: {
dist: {
src: [
"src/head.js",
"src/EventEmitter.js",
"src/Constants.js",
"src/Exceptions.js",
"src/Timers.js",
"src/Transport.js",
"src/Parser.js",
"src/SIPMessage.js",
"src/URI.js",
"src/NameAddrHeader.js",
"src/Transactions.js",
"src/Dialogs.js",
"src/RequestSender.js",
"src/InDialogRequestSender.js",
"src/Registrator.js",
"src/Session.js",
"src/MediaSession.js",
"src/Message.js",
"src/UA.js",
"src/Utils.js",
"src/SanityCheck.js",
"src/DigestAuthentication.js",
"src/WebRTC.js",
"src/tail.js"
'src/head.js',
'src/EventEmitter.js',
'src/Constants.js',
'src/Exceptions.js',
'src/Timers.js',
'src/Transport.js',
'src/Parser.js',
'src/SIPMessage.js',
'src/URI.js',
'src/NameAddrHeader.js',
'src/Transactions.js',
'src/Dialogs.js',
'src/RequestSender.js',
'src/InDialogRequestSender.js',
'src/Registrator.js',
'src/Session.js',
'src/MediaSession.js',
'src/Message.js',
'src/UA.js',
'src/Utils.js',
'src/SanityCheck.js',
'src/DigestAuthentication.js',
'src/WebRTC.js',
'src/tail.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
},
post: {
src: [
'dist/<%= pkg.name %>-<%= pkg.version %>.js',
"src/Grammar/dist/Grammar.js"
'src/Grammar/dist/Grammar.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.js'
},
post_min: {
src: [
'dist/<%= pkg.name %>-<%= pkg.version %>.min.js',
"src/Grammar/dist/Grammar.min.js"
'dist/<%= pkg.name %>-<%= pkg.version %>.min.js',
'src/Grammar/dist/Grammar.min.js'
],
dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js'
}
Expand Down Expand Up @@ -86,14 +86,17 @@ module.exports = function(grunt) {
globals: {}
},
qunit: {
all: ['qunitjs/*.html']
noWebRTC: ['qunitjs/testNoWebRTC.html'],
WebRTC: ['qunitjs/testWebRTC.html']
},
uglify: {}
});

// Default task.
grunt.registerTask('default', 'concat:dist lint min concat:post concat:post_min');

// Test task.
grunt.registerTask('test', 'qunit');
// Test tasks.
grunt.registerTask('testNoWebRTC', 'qunit:noWebRTC');
grunt.registerTask('testWebRTC', 'qunit:WebRTC');
grunt.registerTask('test', 'testNoWebRTC');
};
File renamed without changes.
6 changes: 1 addition & 5 deletions qunitjs/index.html → qunitjs/testNoWebRTC.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<!DOCTYPE html>

<html>

<head>
Expand All @@ -11,15 +10,12 @@
<script src="javascript/helpers.js"></script>
<script src="javascript/test-parser.js"></script>
<script src="javascript/test-normalizeURI.js"></script>
<script src="javascript/test-UA.js"></script>
<script src="javascript/test-UA-no-WebRTC.js"></script>
</head>

<body>
<div id="qunit"></div>
<div id="qunit-fixture"></div>

<video id="selfView" autoplay hidden=false></video>
<video id="remoteView" autoplay hidden=false></video>
</body>

</html>

0 comments on commit b0603e3

Please sign in to comment.