-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b51d7c8
Showing
18 changed files
with
299 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: CI | ||
|
||
on: push | ||
|
||
jobs: | ||
|
||
CI: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions/setup-node@master | ||
with: | ||
node-version: '14.x' | ||
- run: | | ||
npm i | ||
npm test --if-present | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
node_modules | ||
dist | ||
package-lock.json | ||
debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
./test | ||
./repl | ||
src | ||
./index.html | ||
|
||
.github | ||
|
||
./tsconfig.prod.json | ||
./tsconfig.dev.json | ||
./rollup.sever.common.config.js | ||
./rollup.web.common.config.js | ||
./rollup.sever.dev.config.js | ||
./rollup.web.dev.config.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Jest expect ordered | ||
|
||
Jest, expect one, once and/or ordered. | ||
|
||
> Please note that Jest expect ordered is currently under development and not yet suited for production | ||
## Installation | ||
|
||
```shell | ||
$ npm i jest-expect-ordered | ||
``` | ||
|
||
## Usage | ||
|
||
|
||
|
||
```ts | ||
import jestExpectOrdered from "jest-expect-ordered" | ||
|
||
jestExpectOrdered() | ||
``` | ||
|
||
## Contribute | ||
|
||
All feedback is appreciated. Create a pull request or write an issue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
|
||
export function jestExpectOrdered() { | ||
|
||
} | ||
|
||
export default jestExpectOrdered |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Jest expect ordered</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
</head> | ||
<body> | ||
<script> | ||
location.href = "./repl"; | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = { | ||
testEnvironment: "node", | ||
verbose: true, | ||
rootDir: "test/dist" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "jest-expect-ordered", | ||
"version": "0.0.1", | ||
"description": "Jest, expect one, once and/or ordered.", | ||
"main": "app/dist/jestExpectOrdered.js", | ||
"types": "app/dist/jestExpectOrdered.d.ts", | ||
"scripts": { | ||
"build": "tsc -p ./tsconfig.prod.json", | ||
"dev": "npm run devNode", | ||
"devWeb": "rollup --config rollup.web.dev.config.js -w", | ||
"devNode": "rollup --config rollup.node.dev.config.js -w", | ||
"deploy": "npm run build && npm publish", | ||
"repl": "node ./repl/dist/jestExpectOrdered-repl.js", | ||
"start": "npm run repl", | ||
"buildTest": "rollup --config rollup.node.test.config.js", | ||
"test": "npm run buildTest && jest" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/maximilianMairinger/jestExpectOrdered.git" | ||
}, | ||
"keywords": [ | ||
"jest", | ||
"expect", | ||
"ordered", | ||
"once", | ||
"one" | ||
], | ||
"author": "Maximilian Mairinger", | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/maximilianMairinger/jestExpectOrdered/issues" | ||
}, | ||
"homepage": "https://github.com/maximilianMairinger/jestExpectOrdered#readme", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^13.0.0", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@rollup/plugin-node-resolve": "^8.1.0", | ||
"@rollup/plugin-typescript": "^5.0.0", | ||
"@types/jest": "^26.0.15", | ||
"@types/node": "^13.13.4", | ||
"jest": "^26.6.3", | ||
"rollup": "^2.18.1", | ||
"tslib": "2.0.0", | ||
"typescript": "^4.0.2", | ||
"webpack-merge": "^5.0.9" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset='utf-8'> | ||
<meta http-equiv='X-UA-Compatible' content='IE=edge'> | ||
<title>Jest expect ordered - Repl</title> | ||
<meta name='viewport' content='width=device-width, initial-scale=1'> | ||
<style> | ||
body { | ||
width: 100%; | ||
height: 100vh; | ||
margin: 0; | ||
background: rgb(43, 43, 43); | ||
} | ||
#main { | ||
position: fixed; | ||
width: 100%; | ||
height: 100%; | ||
} | ||
#test { | ||
width: 100px; | ||
height: 100px; | ||
background: blue; | ||
transform: translateY(100px) | ||
} | ||
#scroll { | ||
height: 4000px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="main"> | ||
<div id="test"></div> | ||
|
||
|
||
</div> | ||
<div id="scroll"></div> | ||
|
||
<script src='./dist/jestExpectOrdered-repl.js'></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import jestExpectOrdered from "../../app/src/jestExpectOrdered" | ||
//const testElem = document.querySelector("#test") | ||
|
||
jestExpectOrdered() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import typescript from '@rollup/plugin-typescript'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import commonJS from '@rollup/plugin-commonjs' | ||
import json from '@rollup/plugin-json' | ||
|
||
|
||
export default { | ||
input: 'repl/src/repl.ts', | ||
output: { | ||
file: 'repl/dist/jestExpectOrdered-repl.js', | ||
format: 'cjs', | ||
sourcemap: true | ||
}, | ||
plugins: [ | ||
typescript({tsconfig: "./tsconfig.dev.json", noEmitOnError: false, sourceMap: true}), | ||
resolve({modulesOnly: true, preferBuiltins: true}), | ||
commonJS({ | ||
include: 'node_modules/**' | ||
}), | ||
json() | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { merge } from "webpack-merge" | ||
import commonMod from "./rollup.node.common.config" | ||
|
||
|
||
export default merge(commonMod, { | ||
watch: { | ||
include: ['app/src/**', "repl/src/**"], | ||
exclude: 'node_modules/**' | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { merge } from "webpack-merge" | ||
import commonMod from "./rollup.node.common.config" | ||
|
||
|
||
export default merge(commonMod, { | ||
input: 'test/src/test.ts', | ||
output: { | ||
file: 'test/dist/test.js', | ||
format: 'cjs', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import typescript from '@rollup/plugin-typescript'; | ||
import resolve from '@rollup/plugin-node-resolve'; | ||
import commonJS from '@rollup/plugin-commonjs' | ||
import json from '@rollup/plugin-json' | ||
|
||
|
||
export default { | ||
input: 'repl/src/repl.ts', | ||
output: { | ||
file: 'repl/dist/jestExpectOrdered-repl.js', | ||
format: 'cjs', | ||
sourcemap: true | ||
}, | ||
sourcemap: true, | ||
plugins: [ | ||
typescript({tsconfig: "./tsconfig.dev.json", noEmitOnError: false, sourceMap: true}), | ||
resolve({browser: true}), | ||
commonJS({ | ||
include: 'node_modules/**' | ||
}), | ||
json() | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { merge } from "webpack-merge" | ||
import commonMod from "./rollup.web.common.config" | ||
|
||
|
||
export default merge(commonMod, { | ||
watch: { | ||
include: ['app/src/**', "repl/src/**"], | ||
exclude: 'node_modules/**' | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { test } from "shelljs" | ||
import { describe } from "yargs" | ||
import jestExpectOrdered from "../../app/src/jestExpectOrdered" | ||
|
||
describe("core", () => { | ||
|
||
test("mock", () => { | ||
|
||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"compilerOptions": { | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"resolveJsonModule": true, | ||
"allowJs": true, | ||
"skipLibCheck": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"compilerOptions": { | ||
"outDir": "./app/dist", | ||
"module": "esnext", | ||
"target": "esnext", | ||
"moduleResolution": "node", | ||
"allowSyntheticDefaultImports": true, | ||
"declaration": true, | ||
"resolveJsonModule": true, | ||
"allowJs": true, | ||
"skipLibCheck": true | ||
}, | ||
"exclude": [ | ||
"./test", | ||
"./app/dist" | ||
], | ||
"include": [ | ||
"./app/src" | ||
] | ||
} |