File tree Expand file tree Collapse file tree 6 files changed +43
-11
lines changed
Expand file tree Collapse file tree 6 files changed +43
-11
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,11 @@ $ npm install @form8ion/ski-patrol --save-dev
3636### Example
3737
3838``` javascript
39- import skiPatrol from ' @form8ion/ski-patrol' ;
39+ import {assess } from ' @form8ion/ski-patrol' ;
40+
41+ (async () => {
42+ await assess ();
43+ })();
4044```
4145
4246## Contributing
Original file line number Diff line number Diff line change 1- // remark-usage-ignore-next
2- /* eslint-disable-next-line no-unused-vars */
3- import skiPatrol from './lib/index.cjs' ;
1+ import { patrol } from './lib/index.cjs' ;
2+
3+ ( async ( ) => {
4+ await patrol ( { projectRoot : process . cwd ( ) } ) ;
5+ } ) ( ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ export default function ( ) {
2+
3+ }
Original file line number Diff line number Diff line change 1+ import { assert } from 'chai' ;
2+ import sinon from 'sinon' ;
3+ import any from '@travi/any' ;
4+ import * as husky from './husky' ;
5+ import { patrol } from './ski-patrol' ;
6+
7+ suite ( 'ski-patrol' , ( ) => {
8+ let sandbox ;
9+
10+ setup ( ( ) => {
11+ sandbox = sinon . createSandbox ( ) ;
12+
13+ sandbox . stub ( husky , 'default' ) ;
14+ } ) ;
15+
16+ teardown ( ( ) => sandbox . restore ( ) ) ;
17+
18+ test ( 'that the project is checked for issues' , async ( ) => {
19+ const projectRoot = any . string ( ) ;
20+
21+ await patrol ( { projectRoot} ) ;
22+
23+ assert . calledWith ( husky . default , projectRoot ) ;
24+ } ) ;
25+ } ) ;
Original file line number Diff line number Diff line change 1+ import husky from './husky' ;
2+
3+ export async function patrol ( { projectRoot} ) {
4+ await husky ( projectRoot ) ;
5+ }
You can’t perform that action at this time.
0 commit comments