Skip to content

Commit

Permalink
Switch to yarn lock and tweak configs so tests are running and change…
Browse files Browse the repository at this point in the history
… can be made iteratively (#26)

* upgrade actions and tests so that improvements can be made iteratively

* add npm/yarn commands and fix prettier issue in tests

* add markdown checking, fix initial issues
  • Loading branch information
draco2003 authored Oct 21, 2022
1 parent 8585a8d commit 8e87d52
Show file tree
Hide file tree
Showing 8 changed files with 5,246 additions and 7,727 deletions.
1 change: 1 addition & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[ignore]
.*/dist/.*
.*/__tests__/.*
.*/node_modules/resolve/test/resolver/malformed_package_json/package.json
15 changes: 15 additions & 0 deletions .markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"default": true,
"MD013": {
"line_length": 10000,
"headings": false,
"code_blocks": false,
"tables": false
},
"MD024": {
"siblings_only": true
},
"MD041": false,
"MD033": false,
"MD001": false
}
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Data snapshots should be committed to version control, as regular snapshot files

### Installing

```
```bash
npm i --save-dev data-snapshot
```

Expand All @@ -40,14 +40,14 @@ test('some-spec', async () => {

The data is never actually expired (to avoid CI unintentionally triggering an Ajax call, etc). However, if you would like to be reminded with a console warning to update your data periodically, set an expires flag.

```
```javascript
const ONE_MONTHISH = 1000 * 60 * 60 * 24 * 30;
dataSnapshot('key', thunkPromise, {expires: Date.now() + ONE_MONTHISH});
```

## API

```
```javascript
dataSnapshot<D>(
name: string,
thunkPromise: () => Promise<D>,
Expand All @@ -59,7 +59,7 @@ dataSnapshot<D>(

## Running the tests

```
```bash
npm test
```

Expand Down
Loading

0 comments on commit 8e87d52

Please sign in to comment.