Merge branch 'master' into script-setup
This commit is contained in:
commit
dd5a938b44
58
package.json
58
package.json
|
|
@ -9,47 +9,47 @@
|
|||
"lint:script": "eslint \"{src/**/*.{ts,vue},cypress/**/*.js}\"",
|
||||
"lint:tsc": "vue-tsc --noEmit",
|
||||
"lint": "concurrently 'yarn lint:tsc' 'yarn lint:script'",
|
||||
"test:unit": "jest --coverage",
|
||||
"test:unit": "jest",
|
||||
"test:e2e": "yarn build && concurrently -k \"yarn serve\" \"cypress run -c baseUrl=http://localhost:5000\"",
|
||||
"test:e2e:ci": "cypress run -C cypress.prod.json",
|
||||
"test": "yarn test:unit && yarn test:e2e"
|
||||
},
|
||||
"dependencies": {
|
||||
"@harlem/core": "^1.3.1",
|
||||
"@harlem/core": "^1.3.2",
|
||||
"insane": "^2.6.2",
|
||||
"marked": "^2.0.3",
|
||||
"vue": "^3.0.11",
|
||||
"vue-router": "^4.0.6"
|
||||
"marked": "^2.1.3",
|
||||
"vue": "^3.2.2",
|
||||
"vue-router": "^4.0.11"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.13.16",
|
||||
"@testing-library/jest-dom": "^5.11.10",
|
||||
"@testing-library/vue": "^6.4.0",
|
||||
"@types/jest": "^26.0.22",
|
||||
"@typescript-eslint/eslint-plugin": "^4.22.0",
|
||||
"@typescript-eslint/parser": "^4.22.0",
|
||||
"@vitejs/plugin-vue": "^1.2.1",
|
||||
"@vue/compiler-sfc": "^3.0.11",
|
||||
"babel-jest": "^26.6.3",
|
||||
"concurrently": "^6.0.2",
|
||||
"cypress": "^7.1.0",
|
||||
"eslint": "^7.25.0",
|
||||
"@babel/core": "^7.15.0",
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"@testing-library/vue": "^6.4.2",
|
||||
"@types/jest": "^27.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "^4.29.1",
|
||||
"@typescript-eslint/parser": "^4.29.1",
|
||||
"@vitejs/plugin-vue": "^1.4.0",
|
||||
"@vue/compiler-sfc": "^3.2.2",
|
||||
"babel-jest": "^27.0.6",
|
||||
"concurrently": "^6.2.1",
|
||||
"cypress": "^8.2.0",
|
||||
"eslint": "^7.32.0",
|
||||
"eslint-config-standard-with-typescript": "^20.0.0",
|
||||
"eslint-plugin-cypress": "^2.11.2",
|
||||
"eslint-plugin-import": "^2.22.1",
|
||||
"eslint-plugin-cypress": "^2.11.3",
|
||||
"eslint-plugin-import": "^2.24.0",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-promise": "^4.3.1",
|
||||
"eslint-plugin-vue": "^7.8.0",
|
||||
"eslint-plugin-vue": "^7.16.0",
|
||||
"husky": "^4.3.8",
|
||||
"jest": "^26.6.3",
|
||||
"jsdom": "^16.5.3",
|
||||
"lint-staged": "^10.5.4",
|
||||
"jest": "^27.0.6",
|
||||
"jsdom": "^17.0.0",
|
||||
"lint-staged": "^11.1.2",
|
||||
"rollup-plugin-analyzer": "^4.0.0",
|
||||
"ts-jest": "^26.5.5",
|
||||
"typescript": "^4.2.4",
|
||||
"vite": "^2.2.1",
|
||||
"vue-jest": "^5.0.0-alpha.8",
|
||||
"vue-tsc": "^0.0.25"
|
||||
"ts-jest": "^27.0.4",
|
||||
"typescript": "^4.3.5",
|
||||
"vite": "^2.4.4",
|
||||
"vue-tsc": "^0.2.2",
|
||||
"vue3-jest": "^27.0.0-alpha.2"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
},
|
||||
"testEnvironment": "jsdom",
|
||||
"transform": {
|
||||
"^.+\\.vue$": "vue-jest",
|
||||
"^.+\\.vue$": "vue3-jest",
|
||||
"^.+\\js$": "babel-jest"
|
||||
},
|
||||
"collectCoverageFrom": [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
import { request } from '../services'
|
||||
import params2query from './params-to-query'
|
||||
|
||||
describe('# params2query', () => {
|
||||
it('should return query string given an object', () => {
|
||||
const params = {
|
||||
foo: 'bar',
|
||||
foo2: 'bar2',
|
||||
}
|
||||
|
||||
const result = params2query(params)
|
||||
|
||||
expect(result).toEqual('foo=bar&foo2=bar2')
|
||||
})
|
||||
})
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
type StorageType = 'localStorage' | 'sessionStorage'
|
||||
|
||||
export default class Storage<T = unknown> {
|
||||
key: string
|
||||
storageType: StorageType
|
||||
private readonly key: string
|
||||
private readonly storageType: StorageType
|
||||
|
||||
constructor (key: string, storageType: StorageType = 'localStorage') {
|
||||
this.key = key
|
||||
|
|
|
|||
Loading…
Reference in New Issue