Pārlūkot izejas kodu

add test task, avoid attempt to run tests in unrelated html files

Hakim El Hattab 12 gadi atpakaļ
vecāks
revīzija
1c8fd60595
3 mainītis faili ar 7 papildinājumiem un 3 dzēšanām
  1. 4 1
      Gruntfile.js
  2. 1 1
      package.json
  3. 2 1
      test/test.js

+ 4 - 1
Gruntfile.js

@@ -17,7 +17,7 @@ module.exports = function(grunt) {
 
 		// Tests will be added soon
 		qunit: {
-			files: [ 'test/**/*.html' ]
+			files: [ 'test/*.html' ]
 		},
 
 		uglify: {
@@ -130,4 +130,7 @@ module.exports = function(grunt) {
 	// Serve presentation locally
 	grunt.registerTask( 'serve', [ 'connect', 'watch' ] );
 
+	// Run tests
+	grunt.registerTask( 'test', [ 'jshint', 'qunit' ] );
+
 };

+ 1 - 1
package.json

@@ -5,7 +5,7 @@
   "homepage": "http://lab.hakim.se/reveal-js",
   "subdomain": "revealjs",
   "scripts": {
-    "test": "grunt jshint qunit",
+    "test": "grunt test",
     "start": ""
   },
   "author": {

+ 2 - 1
test/test.js

@@ -206,7 +206,6 @@ Reveal.addEventListener( 'ready', function() {
 
 	asyncTest( 'fragmentshown event', function() {
 		expect( 2 );
-		start();
 
 		var _onEvent = function( event ) {
 			ok( true, 'event fired' );
@@ -221,6 +220,8 @@ Reveal.addEventListener( 'ready', function() {
 		Reveal.next();
 		Reveal.prev(); // shouldn't fire fragmentshown
 
+		start();
+
 		Reveal.removeEventListener( 'fragmentshown', _onEvent );
 	});
 

PANIC: session(release): write data/sessions/3/5/35a6201ca1d9ae6e: no space left on device

PANIC

session(release): write data/sessions/3/5/35a6201ca1d9ae6e: no space left on device
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/session@v1.0.3/session.go:204 (0xb13e07)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:80 (0x967b75)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:114 (0x967bf6)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/recovery.go:161 (0x15baec4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/logger.go:40 (0x96b257)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:157 (0x9512ee)
/my/cache/.heroku/go/go-path/pkg/mod/github.com/go-macaron/inject@v0.0.0-20200308113650-138e5925c53b/inject.go:135 (0x951205)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/context.go:124 (0x967cc4)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:187 (0x972959)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/router.go:304 (0x973a01)
/my/cache/.heroku/go/go-path/pkg/mod/gopkg.in/macaron.v1@v1.5.1/macaron.go:218 (0x96c572)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:3311 (0x85a5cd)
/my/cache/.heroku/go/go1.26.3/go/src/net/http/server.go:2073 (0x837f6f)
/my/cache/.heroku/go/go1.26.3/go/src/runtime/asm_amd64.s:1771 (0x493380)