Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vladikoff committed May 4, 2020
1 parent f4d996b commit 3caf327
Show file tree
Hide file tree
Showing 8 changed files with 109 additions and 64 deletions.
8 changes: 2 additions & 6 deletions .travis.yml
@@ -1,15 +1,11 @@
sudo: required

language: node_js

node_js:
- "8"
- "9"
- "10"
- "12"

matrix:
fast_finish: true

cache:
directories:
- node_modules
cache: npm
5 changes: 5 additions & 0 deletions CHANGELOG
@@ -1,3 +1,8 @@
v2.2.0:
date: 2020-05-04
changes:
- Dependency updates
- options.sandboxArgs; passing options to puppeteer
v2.1.3:
date: 2019-07-31
changes:
Expand Down
58 changes: 29 additions & 29 deletions README.md
Expand Up @@ -178,7 +178,6 @@ Example `sandboxArgs` object:
}
```


#### options.summary
Type: `Boolean`
Default: `false`
Expand Down Expand Up @@ -287,70 +286,70 @@ grunt.initConfig({
});
```

#### Sample RequireJS/NPM Template usage
#### Passing options to sandbox (puppeteer)

See [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions) for a complete list of arguments.

```js
// Example configuration
grunt.initConfig({
jasmine: {
yourTask: {
customTemplate: {
src: 'src/**/*.js',
options: {
specs: 'spec/*Spec.js',
template: require('grunt-template-jasmine-requirejs')
helpers: 'spec/*Helper.js',
template: 'custom.tmpl',
sandboxArgs: {
args: ['--no-sandbox'],
timeout: 3000,
defaultViewport: {
isMobile: true
}
}
}
}
}
});
```

NPM Templates are just node modules, so you can write and treat them as such.

Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation
for more information on the RequireJS template.

#### Keeping temp files in an existing directory

Supplying a custom temp directory
#### Sample RequireJS/NPM Template usage

```js
// Example configuration
grunt.initConfig({
jasmine: {
pivotal: {
yourTask: {
src: 'src/**/*.js',
options: {
keepRunner: true,
tempDir: 'bin/jasmine/',
specs: 'spec/*Spec.js',
helpers: 'spec/*Helper.js'
template: require('grunt-template-jasmine-requirejs')
}
}
}
});
```

#### Passing options to sandbox (puppeteer)
NPM Templates are just node modules, so you can write and treat them as such.

See [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions) for a complete list of arguments.
Please see the [grunt-template-jasmine-requirejs](https://github.com/jsoverson/grunt-template-jasmine-requirejs) documentation
for more information on the RequireJS template.

#### Keeping temp files in an existing directory

Supplying a custom temp directory

```js
// Example configuration
grunt.initConfig({
jasmine: {
customTemplate: {
pivotal: {
src: 'src/**/*.js',
options: {
keepRunner: true,
tempDir: 'bin/jasmine/',
specs: 'spec/*Spec.js',
helpers: 'spec/*Helper.js',
template: 'custom.tmpl',
sandboxArgs: {
args: ['--no-sandbox'],
timeout: 3000,
defaultViewport: {
isMobile: true
}
}
helpers: 'spec/*Helper.js'
}
}
}
Expand All @@ -360,6 +359,7 @@ grunt.initConfig({

## Release History

* 2020-05-04   v2.2.0   Dependency updates options.sandboxArgs; passing options to puppeteer
* 2019-07-31   v2.1.3   Fix security deps Update Puppeteer
* 2018-11-14   v2.0.3   [object Object] Build only should pass if the buildSpecrunner runs without error
* 2018-08-13   v2.0.2   Fix noSandbox option. Fix startTime, and timing issues.
Expand Down Expand Up @@ -400,4 +400,4 @@ grunt.initConfig({

Task submitted by [Jarrod Overson](http://jarrodoverson.com)

*This file was generated on Wed Jul 31 2019 12:27:22.*
*This file was generated on Mon May 04 2020 15:38:37.*
29 changes: 15 additions & 14 deletions appveyor.yml
@@ -1,33 +1,34 @@
clone_depth: 10
clone_depth: 5

version: "{build}"

# What combinations to test
environment:
matrix:
- nodejs_version: "8"
platform: x86
- nodejs_version: "9"
platform: x86
- nodejs_version: "10"
platform: x86
- NODEJS_VERSION: "8"
PLATFORM: x86
- NODEJS_VERSION: "8"
PLATFORM: x64
- NODEJS_VERSION: "10"
PLATFORM: x64
- NODEJS_VERSION: "12"
PLATFORM: x64

install:
- ps: Install-Product node $env:nodejs_version $env:platform
- npm install
- ps: Install-Product node $env:NODEJS_VERSION $env:PLATFORM
- npm ci

test_script:
# Output useful info for debugging
- node --version && npm --version
- node --version
- npm --version
# We test multiple Windows shells because of prior stdout buffering issues
# filed against Grunt. https://github.com/joyent/node/issues/3584
- ps: "npm test # PowerShell" # Pass comment to PS for easier debugging
- cmd: npm test
- npm test

build: off

matrix:
fast_finish: true

cache:
- node_modules -> package.json
- '%APPDATA%\npm-cache\ -> appveyor.yml,package.json,package-lock.json'
27 changes: 27 additions & 0 deletions docs/jasmine-examples.md
Expand Up @@ -66,6 +66,33 @@ grunt.initConfig({
});
```

## Passing options to sandbox (puppeteer)

See [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions) for a complete list of arguments.

```js
// Example configuration
grunt.initConfig({
jasmine: {
customTemplate: {
src: 'src/**/*.js',
options: {
specs: 'spec/*Spec.js',
helpers: 'spec/*Helper.js',
template: 'custom.tmpl',
sandboxArgs: {
args: ['--no-sandbox'],
timeout: 3000,
defaultViewport: {
isMobile: true
}
}
}
}
}
});
```

## Sample RequireJS/NPM Template usage

```js
Expand Down
16 changes: 16 additions & 0 deletions docs/jasmine-options.md
Expand Up @@ -113,6 +113,22 @@ Default: `'full'`
* `short` only displays a success or failure character for each test (useful with large suites)
* `none` displays nothing

## options.sandboxArgs
Type: `Object`
Default: `{ args: [] }`

Pass arugments to puppeteer launcher. For the list of available options, please look at [puppeteer launch options](https://pptr.dev/#?product=Puppeteer&version=v3.0.1&show=api-puppeteerlaunchoptions).

Example `sandboxArgs` object:
```js
{
args: {
'=-allow-file-access-from-files'
},
executeablePath: '/some/other/path/to/chrome'
}
```

## options.summary
Type: `Boolean`
Default: `false`
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -27,7 +27,7 @@
"devDependencies": {
"grunt": "^1.0.4",
"grunt-contrib-connect": "^2.0.0",
"grunt-contrib-internal": "^3.1.0",
"grunt-contrib-internal": "^4.0.1",
"grunt-contrib-nodeunit": "^2.0.0",
"grunt-contrib-watch": "^1.1.0"
},
Expand Down

0 comments on commit 3caf327

Please sign in to comment.