Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
Expand All @@ -11,19 +8,25 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x, 15.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
registry-url: https://registry.npmjs.org
node-version: ${{ matrix.node-version }}
cache: pnpm

- run: pnpm install --frozen-lockfile
- run: pnpm run test
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
24.11.1
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use in unit tests.
## Installation
The package can be installed from npm:

```shell script
```shell
npm install --save node-storage-shim
```

Expand Down Expand Up @@ -41,13 +41,14 @@ global.localStorage = new StorageShim()
global.sessionStorage = new StorageShim()
```


## Running Unit Tests
The unit tests use mocha, and are setup to run by the standard npm test command.
This also runs a sanity test of the typescript declaration in the test-typescript-declarations directory

npm install
npm test
```shell
pnpm install
pnpm test
```

## Limitations
- You cannot use any of the method names as keys, this is a trade-off that is required to support for ... in iteration.
Expand Down
Loading