Skip to content

Commit

Permalink
test jsdom environemtn
Browse files Browse the repository at this point in the history
  • Loading branch information
omrilotan committed May 19, 2022
1 parent 4380d9a commit e500525
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
3 changes: 3 additions & 0 deletions jest/jest.config.browser.js
@@ -0,0 +1,3 @@
module.exports = {
testEnvironment: 'jsdom',
}
6 changes: 4 additions & 2 deletions jest/package.json
@@ -1,11 +1,12 @@
{
"type": "commonjs",
"scripts": {
"browser": "jest esm -c jest.config.browser.js",
"cjs": "jest cjs -c jest.config.js",
"esm": "jest esm -c jest.config.js",
"ts": "jest ts -c jest.config.ts.js",
"pretest": "which jest || npm i",
"test": "npm run esm && npm run cjs && npm run ts"
"test": "npm run esm && npm run cjs && npm run browser && npm run ts",
"ts": "jest ts -c jest.config.ts.js"
},
"dependencies": {
"isbot": "../"
Expand All @@ -17,6 +18,7 @@
"@types/jest": "^27.5.0",
"babel-jest": "^28.1.0",
"jest": "^28.1.0",
"jest-environment-jsdom": "^28.1.0",
"ts-jest": "^28.0.2"
}
}
12 changes: 9 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "isbot",
"version": "3.4.7",
"version": "3.5.0-rc",
"description": "🤖 detect bots/crawlers/spiders via the user agent.",
"keywords": [
"bot",
Expand All @@ -27,10 +27,16 @@
"exports": {
"./package.json": "./package.json",
".": {
"browser": "./index.mjs",
"browser": {
"import": "./index.mjs",
"require": "./index.js"
},
"node": {
"import": "./index.mjs",
"require": "./index.js"
},
"import": "./index.mjs",
"require": "./index.js",
"node": "./index.js",
"default": "./index.js"
}
},
Expand Down

0 comments on commit e500525

Please sign in to comment.