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
... | |
FE_Test: | |
extends: .Job_Only | |
image: node:10 | |
stage: fetest | |
before_script: | |
- npm install | |
script: | |
- npm test | |
coverage: /All files\s*\|\s*([\d\.]+)/ |
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
variables: | |
MAVEN_CLI_OPTS: "--batch-mode" | |
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository" | |
CI_REPOSITORY_URL: https://alvin.h:[email protected]/$CI_PROJECT_PATH.git | |
cache: | |
key: "$CI_COMMIT_REF_NAME" | |
paths: | |
- src/main/resources/static/ | |
- 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
// Jest Snapshot v1, https://goo.gl/fbAQLP | |
exports[`detailMarket.vue snapshot 1`] = ` | |
<div> | |
<h5> | |
Min Market Cap | |
</h5> | |
<table> | |
<thead> |
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
import { shallow } from 'vue-test-utils' | |
import DetailMarketComp from '@/detailMarket' | |
import { data } from '../samples.js' | |
describe('detailMarket.vue', () => { | |
let cmp ; | |
beforeEach(() => { | |
cmp = shallow(DetailMarketComp, { | |
propsData: { |
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
import sinon from 'sinon'; | |
const createElement = global.document.createElement; | |
const FAKECanvasElement = { | |
getContext: jest.fn(() => { | |
return { | |
fillStyle: null, | |
fillRect: jest.fn(), | |
drawImage: jest.fn(), | |
getImageData: jest.fn(), |
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
module.exports = { | |
"setupFiles": [ "./src/test/client/setup.js" ], | |
"verbose": true, | |
"moduleFileExtensions": [ | |
"js", | |
"json", | |
"vue" | |
], | |
"moduleNameMapper": { | |
"^@/(.*)$": "<rootDir>/src/main/client/$1" |
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
module.exports = { | |
"presets": [ | |
[ | |
"@babel/preset-env", | |
{ | |
"useBuiltIns": "entry" | |
} | |
] | |
], | |
"env": { |
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
<plugin> | |
<groupId>com.github.eirslett</groupId> | |
<artifactId>frontend-maven-plugin</artifactId> | |
<version>1.6</version> | |
<executions> | |
<execution> | |
<id>install node and npm</id> | |
<goals> | |
<goal>install-node-and-npm</goal> | |
</goals> |
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
... | |
return { | |
... | |
module: { | |
rules: [].concat([ env == 'production' ? | |
{ | |
test: /\.(jpe?g|png|gif|svg)$/i, | |
use: [{ | |
loader: 'file-loader', | |
options: { |
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
module.exports = (env) => { | |
const clientPath = path.resolve(__dirname, 'src/main/client'); | |
... | |
return { | |
... | |
optimization: { | |
splitChunks: { | |
cacheGroups: { | |
common: { | |
test: clientPath + '/common', |