-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(test): adding testing library for make user course in application (
#111) * feat(mocks): adding mocks for development mode * feat(jest): adding more test * feat(connection): adding connection mock and fetch request mocjing * feat(connection): adding test for connection to github * feat(test): adding unit testing in skizzle
- Loading branch information
Showing
85 changed files
with
12,832 additions
and
4,069 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,31 @@ | ||
|
||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:@typescript-eslint/recommended-requiring-type-checking' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
tsconfigRootDir: __dirname, | ||
project: ['./tsconfig.json'], | ||
extraFileExtensions: ['.svelte'] | ||
}, | ||
env: { | ||
es6: true, | ||
browser: true | ||
}, | ||
overrides: [ | ||
{ | ||
files: ['*.svelte'], | ||
processor: 'svelte3/svelte3' | ||
} | ||
], | ||
settings: { | ||
'svelte3/typescript': require('typescript') | ||
}, | ||
plugins: ['svelte3', '@typescript-eslint'], | ||
ignorePatterns: ['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 |
---|---|---|
@@ -1,26 +1,70 @@ | ||
name: Build/release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
# on: | ||
# push: | ||
# tags: | ||
# - 'v*' | ||
on: push | ||
|
||
jobs: | ||
release: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
- name: Build/release Skizzle | ||
uses: samuelmeuli/action-electron-builder@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
release: ${{ startsWith(github.ref, 'refs/tags/v') }} | ||
test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest] | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Test electron application | ||
run: npm build | ||
build: | ||
if: github.ref == 'refs/heads/alpha' || github.ref == 'refs/heads/beta' || github.ref == 'refs/heads/master' | ||
needs: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [macos-latest, windows-latest] | ||
steps: | ||
- name: Check out Git repository | ||
uses: actions/checkout@v2 | ||
- name: Install Node.js, NPM and Yarn | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14 | ||
- name: Install dependencies | ||
run: npm install | ||
- name: Prepare for app notarization | ||
if: startsWith(matrix.os, 'macos') | ||
# Import Apple API key for app notarization on macOS | ||
run: | | ||
mkdir -p ~/private_keys/ | ||
echo '${{ secrets.api_key }}' > ~/private_keys/AuthKey_${{ secrets.api_key_id }}.p8 | ||
- name: Build/release Electron app | ||
uses: samuelmeuli/action-electron-builder@v1 | ||
with: | ||
github_token: ${{ secrets.github_token }} | ||
release: true | ||
mac_certs: ${{ secrets.mac_certs }} | ||
mac_certs_password: ${{ secrets.mac_certs_password }} | ||
# windows_certs: ${{ secrets.windows_certs }} | ||
# windows_certs_password: ${{ secrets.windows_certs_password }} | ||
env: | ||
API_KEY_ID: ${{ secrets.api_key_id }} | ||
API_KEY_ISSUER_ID: ${{ secrets.api_key_issuer_id }} | ||
|
||
# - name: Send Windows store verification | ||
# if: startsWith(matrix.os, 'windows') | ||
# run: "echo 'This is currently disabled. Help needed!'" | ||
# run: ./tasks/win-store-build.cmd | ||
|
||
# - name: Build/release Skizzle | ||
# uses: samuelmeuli/action-electron-builder@v1 | ||
# with: | ||
# github_token: ${{ secrets.github_token }} | ||
# release: ${{ startsWith(github.ref, 'refs/tags/v') }} |
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 |
---|---|---|
|
@@ -22,4 +22,6 @@ dist | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.vscode | ||
.vscode | ||
|
||
mockServiceWorker.js |
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
module.exports = { | ||
arrowParens: 'avoid', | ||
singleQuote: true, | ||
printWidth: 90, | ||
plugins: ['prettier-plugin-svelte'], | ||
semi: false, | ||
svelteSortOrder: 'options-styles-scripts-markup', | ||
svelteStrictMode: false, | ||
svelteBracketNewLine: true, | ||
svelteIndentScriptAndStyle: true, | ||
trailingComma: 'none' | ||
} |
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 = { | ||
"presets": [ | ||
["@babel/preset-env", { "targets": { "node": "current" } }] | ||
] | ||
}; |
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,3 @@ | ||
owner: AxaGuilDEv | ||
repo: Skizzle | ||
provider: github |
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,42 @@ | ||
const esModules = ["svelte-highlight"].join("|") | ||
|
||
module.exports = { | ||
testEnvironment: 'jsdom', | ||
setupFiles: ['jest-localstorage-mock'], | ||
verbose: true, | ||
testMatch: ["**/__tests__/**/*.+(ts|tsx|js)", "**/?(*.)+(spec).+(ts|tsx|js)"], | ||
clearMocks: true, | ||
transform: { | ||
"^.+\\.(js|mjs)$": "babel-jest", | ||
"^.+\\.ts$": "ts-jest", | ||
"^.+\\.svelte$": [ | ||
"svelte-jester", | ||
{ | ||
"preprocess": true | ||
} | ||
], | ||
".+\\.(css|styl|less|sass|scss|png|jpg|ttf|woff|woff2)$": "jest-transform-stub" | ||
}, | ||
moduleDirectories: ["src","node_modules"], | ||
moduleFileExtensions: [ | ||
"js", | ||
"mjs", | ||
"ts", | ||
"svelte" | ||
], | ||
coverageDirectory: "coverage", | ||
coverageReporters: ["json", "lcov", "text", "clover", "html"], | ||
collectCoverageFrom: [ | ||
"src/**/*.js", | ||
"src/**/*.svelte", | ||
"src/**/*.ts", | ||
"!src/tests/**/*" | ||
], | ||
coverageProvider: "babel", | ||
coveragePathIgnorePatterns: [ | ||
".*\\.d\\.ts" | ||
], | ||
transformIgnorePatterns: [`/node_modules/(?!${esModules})`], | ||
bail: false, | ||
setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect', './src/setupTests.ts'] | ||
}; |
Oops, something went wrong.