karma-viewport
Advanced tools
Comparing version 1.0.7 to 1.0.8
@@ -36,11 +36,12 @@ "use strict"; | ||
* @param file - File | ||
* @param included - Whether the file should be included | ||
* | ||
* @return File pattern | ||
*/ | ||
var pattern = function (file, served) { | ||
if (served === void 0) { served = true; } | ||
var pattern = function (file, included) { | ||
if (included === void 0) { included = true; } | ||
return ({ | ||
pattern: file, | ||
included: true, | ||
served: served, | ||
included: included, | ||
served: true, | ||
watched: false | ||
@@ -47,0 +48,0 @@ }); |
{ | ||
"name": "karma-viewport", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "A Karma plugin for testing responsive features and layout", | ||
@@ -63,3 +63,3 @@ "keywords": [ | ||
"jasmine-core": "^3.6.0", | ||
"karma": "^5.1.1", | ||
"karma": "^6.0.1", | ||
"karma-chrome-launcher": "^3.1.0", | ||
@@ -74,3 +74,3 @@ "karma-clear-screen-reporter": "^1.0.0", | ||
"karma-spec-reporter": "^0.0.32", | ||
"karma-summary-reporter": "^1.8.0", | ||
"karma-summary-reporter": "^2.0.0", | ||
"karma-webpack": "^4.0.2", | ||
@@ -84,4 +84,4 @@ "project-name-generator": "^2.1.7", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12" | ||
"webpack-cli": "^4.0.0" | ||
} | ||
} |
@@ -52,2 +52,7 @@ [![Github Action][action-image]][action-link] | ||
_Note that you (probably) cannot use `viewport` in the top-level scope of your | ||
tests, as Karma might not have initialized all plugins until all files were | ||
read, so makes sure to call the respective functions from the setup hooks of | ||
your test framework or from within your tests._ | ||
### Browser support | ||
@@ -87,3 +92,3 @@ | ||
``` js | ||
viewport.load("/path/to/fixture.html").then(() => { /* webpage was loaded */ }) | ||
await viewport.load("/path/to/fixture.html") | ||
``` | ||
@@ -172,4 +177,10 @@ | ||
callback provided to the breakpoint returns a `Promise`, the return value of | ||
the function will also be a `Promise`. This enables asynchronous tests. | ||
the function will also be a `Promise`. This enables asynchronous tests: | ||
``` js | ||
viewport.each(async name => { | ||
// await ... | ||
}) | ||
``` | ||
### TypeScript | ||
@@ -176,0 +187,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
115400
432
216