Skip to content

Commit

Permalink
Unambiguous tests location
Browse files Browse the repository at this point in the history
  • Loading branch information
fregante committed Dec 27, 2023
1 parent af5c24f commit 589622b
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 16 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,4 @@ Thumbs.db
*.log
logs
*.map
/index.js
/index.d.ts
/index.test.js
/index.test.d.ts
distribution
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
"license": "MIT",
"author": "Federico Brigante <me@fregante.com> (https://fregante.com)",
"type": "module",
"exports": "./index.js",
"types": "./index.d.ts",
"exports": "./distribution/index.js",
"types": "./distribution/index.d.ts",
"files": [
"index.js",
"index.d.ts"
"distribution/index.js",
"distribution/index.d.ts"
],
"scripts": {
"build": "tsc",
Expand Down
1 change: 0 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ If this distinction doesn't matter for you (for example if the protocol is alway

### extractAdditionalPermissions(currentPermissions, options)


Like `queryAdditionalPermissions`, but instead of querying the current permissions, you can pass a [`Permissions`](https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions/Permissions) object.

This function returns synchronously.
Expand Down
8 changes: 4 additions & 4 deletions index.test.ts → source/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable @typescript-eslint/naming-convention */
import {test, describe, assert} from 'vitest';
import manifest2 from './test/fixtures/manifest-v2.json' with {type: 'json'};
import manifest3 from './test/fixtures/manifest-v3.json' with {type: 'json'};
import atStart from './test/fixtures/reported-at-start.json' with {type: 'json'};
import afterAddition from './test/fixtures/reported-after-addition.json' with {type: 'json'};
import manifest2 from '../test-fixtures/manifest-v2.json' with {type: 'json'};
import manifest3 from '../test-fixtures/manifest-v3.json' with {type: 'json'};
import atStart from '../test-fixtures/reported-at-start.json' with {type: 'json'};
import afterAddition from '../test-fixtures/reported-after-addition.json' with {type: 'json'};
import {
normalizeManifestPermissions,
extractAdditionalPermissions,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"compilerOptions": {
"module": "NodeNext",
"resolveJsonModule": true,
"outDir": "distribution"
},
"files": [
"index.ts",
"index.test.ts",
"include": [
"source"
]
}
10 changes: 10 additions & 0 deletions vitest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {configDefaults, defineConfig} from 'vitest/config';

export default defineConfig({
test: {
exclude: [
...configDefaults.exclude,
'distribution/**',
],
},
});

0 comments on commit 589622b

Please sign in to comment.