jest-webextension-mock 3.7.22 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  on:
2
2
  push:
3
3
  branches:
4
- - master
4
+ - main
5
5
 
6
6
  name: Publish
7
7
 
@@ -25,7 +25,7 @@ jobs:
25
25
  - name: Yarn Test
26
26
  run: yarn test
27
27
  - name: Publish
28
- if: github.ref == 'refs/heads/master'
28
+ if: github.ref == 'refs/heads/main'
29
29
  uses: mikeal/merge-release@master
30
30
  env:
31
31
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -2,9 +2,9 @@ name: Build and Test
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
5
+ branches: [ main ]
6
6
  pull_request:
7
- branches: [ master ]
7
+ branches: [ main ]
8
8
 
9
9
  jobs:
10
10
  build:
package/README.md CHANGED
@@ -104,18 +104,7 @@ yarn test
104
104
 
105
105
  ## Publish
106
106
 
107
- To publish a new release, follow these steps:
107
+ Publishing new releases is automated via the GitHub Action https://github.com/mikeal/merge-release tool.
108
+
109
+ To ensure your feature is properly released prefix your commit message with `feat` for any new feature. For example: `feat: new API` and this will bump the minor release number. All other changes will be assumed as patch releases unless you include the string `BREAKING CHANGE` in your commit message or description which will trigger a new major release. (do not do this unless absolutely required)
108
110
 
109
- ```
110
- git checkout -b new-release
111
- yarn run build
112
- yarn run prettier
113
- git commit -a -m 'updating to the latest build release'
114
- # merge pull request, delete branch
115
- git checkout master
116
- git pull
117
- npm version `${version}`
118
- npm publish
119
- git push --tags
120
- ## edit release notes
121
- ```
@@ -137,4 +137,9 @@ describe('browser.runtime', () => {
137
137
  browser.runtime.openOptionsPage();
138
138
  expect(browser.runtime.openOptionsPage).toHaveBeenCalledTimes(1);
139
139
  });
140
+ test('getManifest', () => {
141
+ expect(jest.isMockFunction(browser.runtime.getManifest)).toBe(true);
142
+ expect(browser.runtime.getManifest()).toEqual({ manifest_version: 3 });
143
+ expect(browser.runtime.getManifest).toHaveBeenCalledTimes(1);
144
+ });
140
145
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jest-webextension-mock",
3
- "version": "3.7.22",
3
+ "version": "3.8.0",
4
4
  "description": "Mock the components of a WebExtension",
5
5
  "main": "dist/setup.js",
6
6
  "module": "src/setup.js",
package/src/runtime.js CHANGED
@@ -59,4 +59,5 @@ export const runtime = {
59
59
  return path;
60
60
  }),
61
61
  openOptionsPage: jest.fn(),
62
+ getManifest: jest.fn(() => ({ manifest_version: 3 })),
62
63
  };