forked from fanruan/fineui
Compare commits
107 Commits
research/t
...
master
Author | SHA1 | Date |
---|---|---|
Dailer-刘荣歆 | cdec6f784f | 5 months ago |
Dailer-刘荣歆 | 039ec622c4 | 5 months ago |
翠屏山最速下山传说 | d5ee4e67f9 | 5 months ago |
Oliver.Chen-陈润桐 | 04a58a4a0b | 5 months ago |
Oliver.Chen | 26b2e1332f | 5 months ago |
superman | 77477f1bfd | 5 months ago |
superman | cbdc63081f | 5 months ago |
Zoey.Chen-陈泽语 | 41609ada7e | 5 months ago |
chenzeyu | 37fbf06103 | 5 months ago |
superman | e100e4115e | 5 months ago |
superman | ebbd7e6056 | 5 months ago |
superman | 3063da4874 | 5 months ago |
superman | 736980cb6e | 5 months ago |
Zoey.Chen-陈泽语 | bcedb54782 | 5 months ago |
chenzeyu | bbd0315030 | 5 months ago |
Jimmy.Chai-柴嘉明 | 2109dee89d | 6 months ago |
Jimmy.Chai | c8d04fabdb | 6 months ago |
superman | d421c97306 | 6 months ago |
superman | b6ad497984 | 6 months ago |
superman | a6b9042a49 | 6 months ago |
superman | 6a17673c96 | 6 months ago |
superman | 45172096df | 6 months ago |
superman | 1c7689361d | 6 months ago |
superman | 572d216e64 | 6 months ago |
superman | aaf988b6fe | 6 months ago |
Xavier.Meng-孟宇翔 | aed35bbce6 | 6 months ago |
Xavier.Meng | f9b75be7ea | 6 months ago |
Jimmy.Chai-柴嘉明 | eacdf59bed | 6 months ago |
superman | 91c81250fc | 6 months ago |
fanglei-方磊 | bb260ec29a | 6 months ago |
方磊 | e4aafdc056 | 6 months ago |
superman | 9189327b54 | 6 months ago |
Jimmy.Chai | 02361b2675 | 6 months ago |
superman | 1909ba3ef7 | 6 months ago |
superman | 8a57bcb479 | 6 months ago |
superman | 7bcfbc79d2 | 6 months ago |
superman | 304126a7f1 | 6 months ago |
Zoey.Chen-陈泽语 | fba8461b98 | 6 months ago |
chenzeyu | 8f41724169 | 6 months ago |
Kevin.King-王凯壮 | 9ab289d8c3 | 6 months ago |
chenzeyu | 117d7fb659 | 6 months ago |
Dailer-刘荣歆 | a26102950d | 6 months ago |
superman | 4e63a7ef55 | 6 months ago |
fanglei-方磊 | b74eba39f0 | 6 months ago |
方磊 | e1593bc0fc | 6 months ago |
superman | a33d9862b0 | 6 months ago |
superman | 2d7d80e719 | 6 months ago |
superman | 535f7128fe | 6 months ago |
Kevin.King-王凯壮 | fbe18a5138 | 6 months ago |
Kevin.King-王凯壮 | c22c5d43dd | 6 months ago |
superman | 7b407d4aa1 | 6 months ago |
superman | 1b4e6e43b1 | 6 months ago |
superman | 70e2f876da | 6 months ago |
superman | d3ab2af3fd | 6 months ago |
Zoey.Chen-陈泽语 | 067435dd1e | 6 months ago |
chenzeyu | f00e4c5b6c | 6 months ago |
Dailer-刘荣歆 | 5bff3e170e | 7 months ago |
Dailer-刘荣歆 | 59a4e56d5f | 7 months ago |
superman | 9bb7c12459 | 7 months ago |
superman | 05f6c41996 | 7 months ago |
superman | 7fc5c63af9 | 7 months ago |
superman | fba1af3f9b | 7 months ago |
superman | 12899d2e88 | 7 months ago |
superman | 3fe3b3d8e9 | 7 months ago |
superman | 3b060f11a2 | 7 months ago |
superman | 3f55e7a72b | 7 months ago |
superman | a01610e2ab | 7 months ago |
Zoey.Chen-陈泽语 | e8f7a6c60b | 7 months ago |
chenzeyu | 74ccf2f8cc | 7 months ago |
Zoey.Chen-陈泽语 | f752b70990 | 7 months ago |
chenzeyu | 7beaeccebb | 7 months ago |
superman | 8dbbbd5e2c | 7 months ago |
superman | 2f199552b9 | 7 months ago |
superman | 212e8315f4 | 7 months ago |
superman | b87665d7be | 7 months ago |
Zoey.Chen-陈泽语 | 6378314e1b | 7 months ago |
Zoey.Chen-陈泽语 | 877e71adfc | 7 months ago |
chenzeyu | 4a69f2f440 | 7 months ago |
Zoey.Chen-陈泽语 | e712b52428 | 7 months ago |
chenzeyu | f0e91077bb | 7 months ago |
superman | 00a60c6a63 | 7 months ago |
superman | 083ad18c21 | 8 months ago |
Kevin.King-王凯壮 | 3e44318c7e | 8 months ago |
Kevin.King-王凯壮 | 8d4b0a67cc | 8 months ago |
superman | 36083aca64 | 8 months ago |
superman | ca3659e5e3 | 8 months ago |
superman | ecbc12af1b | 8 months ago |
superman | 6c0c17ac8b | 8 months ago |
superman | de3dd7a48a | 8 months ago |
superman | d19aa45390 | 8 months ago |
superman | d03dff4c64 | 8 months ago |
superman | 9a244ce9cb | 8 months ago |
superman | 201d665d25 | 8 months ago |
superman | 5a7d85e730 | 8 months ago |
superman | 4e2d22a017 | 8 months ago |
superman | 930ebedede | 8 months ago |
superman | 7cb4f23775 | 8 months ago |
superman | e8fa741855 | 8 months ago |
superman | 198d1fcb6f | 8 months ago |
Zoey.Chen-陈泽语 | 7c95e8c1fb | 8 months ago |
superman | 9288b7bd0d | 8 months ago |
chenzeyu | fdb47604f7 | 8 months ago |
superman | af7e395d4a | 8 months ago |
superman | 42deeb4a67 | 8 months ago |
superman | 0537e0c4e9 | 8 months ago |
Dailer-刘荣歆 | f4a5e2e574 | 8 months ago |
Dailer-刘荣歆 | c87867cf2e | 8 months ago |
123 changed files with 1331 additions and 1495 deletions
@ -1,2 +1,2 @@
|
||||
PUPPETEER_DOWNLOAD_BASE_URL=https://cdn.npmmirror.com/binaries/chrome-for-testing |
||||
puppeteer_download_host=https://npm.taobao.org/mirrors |
||||
@fui:registry=https://npm.fineres.com/ |
Binary file not shown.
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.1 MiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,51 +0,0 @@
|
||||
import type { Config } from "jest"; |
||||
// import webpackConfig from "./webpack/webpack.dev";
|
||||
|
||||
export default { |
||||
// testEnvironment: "<rootDir>/test/testEnvironmentJsdom.ts",
|
||||
testEnvironment: "jsdom", |
||||
testEnvironmentOptions: { |
||||
// html: fs.readFileSync(path.join(__dirname, "test/index.html")),
|
||||
}, |
||||
testMatch: ["<rootDir>/src/**/*.test.js"], |
||||
collectCoverage: false, |
||||
collectCoverageFrom: ["src/**/*.js", "!src/**/*.test.js"], |
||||
coverageDirectory: "coverage", |
||||
coverageReporters: ["html", "json-summary", "cobertura"], |
||||
|
||||
reporters: [ |
||||
"default", |
||||
[ |
||||
"jest-html-reporters", |
||||
{ |
||||
publicPath: "./html-report", |
||||
openReport: true, |
||||
}, |
||||
], |
||||
], |
||||
|
||||
transform: { |
||||
"^.+\\.jsx?$": "babel-jest", |
||||
"^.+\\.tsx?$": "babel-jest", |
||||
}, |
||||
|
||||
preset: "jest-puppeteer", |
||||
verbose: true, |
||||
watchman: true, |
||||
injectGlobals: true, |
||||
globals: { |
||||
"ts-jest": { |
||||
tsconfig: "tsconfig.json", |
||||
}, |
||||
}, |
||||
setupFilesAfterEnv: [ |
||||
"<rootDir>/src/bundle.js", |
||||
"<rootDir>/src/core/platform/web/config.js", |
||||
"<rootDir>/../demo/i18n/i18n.cn.js", |
||||
"<rootDir>/test/utils.js", |
||||
"<rootDir>/test/prepare.js", |
||||
], |
||||
moduleNameMapper: { |
||||
"@/(.*)$": "<rootDir>/src/$1", |
||||
}, |
||||
} as Config; |
@ -1,167 +0,0 @@
|
||||
// Karma configuration
|
||||
// Generated on Mon Nov 27 2017 11:16:26 GMT+0800 (中国标准时间)
|
||||
|
||||
const os = require("os"); |
||||
const webpackConfig = require("./webpack/webpack.dev") |
||||
|
||||
process.env.CHROME_BIN = require("puppeteer").executablePath(); |
||||
|
||||
module.exports = function (config) { |
||||
config.set({ |
||||
|
||||
// base path that will be used to resolve all patterns (eg. files, exclude)
|
||||
basePath: "", |
||||
|
||||
|
||||
// frameworks to use
|
||||
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
||||
frameworks: ["webpack", "mocha", "chai"], |
||||
|
||||
|
||||
// list of files / patterns to load in the browser
|
||||
files: [].concat( |
||||
webpackConfig.entry.fineui, |
||||
["test/**/*.js", "src/**/*.test.js"] |
||||
), |
||||
|
||||
exclude: [ |
||||
"src/base/tree/ztree/jquery.ztree.core-3.5.js", |
||||
"src/base/tree/ztree/jquery.ztree.excheck-3.5.js", |
||||
"src/base/single/input/file.js", |
||||
"src/case/loading/loading_pane.js", |
||||
"src/base/tree/ztree/**/*.js", |
||||
"src/case/tree/ztree/*.js", |
||||
"src/widget/multitree/**/*.js", |
||||
"src/widget/multiselecttree/**/*.js", |
||||
"src/component/treevaluechooser/*.js" |
||||
], |
||||
|
||||
|
||||
// preprocess matching files before serving them to the browser
|
||||
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
||||
preprocessors: { |
||||
"src/less/**/*.less": ["webpack"], |
||||
"ui/**/*.less": ["webpack"], |
||||
"src/*.js": ["webpack"], |
||||
"src/**/!(*.test).js": ["webpack"], |
||||
}, |
||||
|
||||
|
||||
// test results reporter to use
|
||||
// possible values: 'dots', 'progress'
|
||||
// available reporters: https://npmjs.org/browse/keyword/karma-reporter
|
||||
reporters: ["progress", "coverage", "html"], |
||||
|
||||
browserDisconnectTolerance: 3, |
||||
browserDisconnectTimeout : 300000, |
||||
browserNoActivityTimeout : 300000, |
||||
|
||||
coverageReporter: { |
||||
// specify a common output directory
|
||||
dir: "coverage/", |
||||
reporters: [ |
||||
// reporters not supporting the `file` property
|
||||
{ type: "html", subdir: "report-html" }, |
||||
{ type: "json-summary", subdir: "report-json-summary" }, |
||||
{ type: "cobertura", subdir: "report-cobertura"} |
||||
] |
||||
}, |
||||
|
||||
htmlReporter: { |
||||
outputFile: "logs/test-report.html" |
||||
}, |
||||
|
||||
|
||||
// web server port
|
||||
port: 9878, |
||||
|
||||
|
||||
// enable / disable colors in the output (reporters and logs)
|
||||
colors: true, |
||||
|
||||
|
||||
// level of logging
|
||||
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
||||
logLevel: config.LOG_INFO, |
||||
|
||||
loggers: [ |
||||
{ |
||||
type: "console" |
||||
}, |
||||
{ |
||||
type: "file", |
||||
filename: "logs/karma.log" |
||||
} |
||||
], |
||||
|
||||
|
||||
// enable / disable watching file and executing tests whenever any file changes
|
||||
autoWatch: true, |
||||
|
||||
// you can define custom flags
|
||||
customLaunchers: { |
||||
HeadlessChrome: { |
||||
base: "ChromeHeadless", |
||||
flags: [ |
||||
"--no-sandbox", |
||||
"--remote-debugging-port=9222", |
||||
"--enable-logging", |
||||
"--user-data-dir=./karma-chrome", |
||||
"--v=1", |
||||
"--disable-background-timer-throttling", |
||||
"--disable-renderer-backgrounding", |
||||
"--proxy-bypass-list=*", |
||||
"--disable-web-security", |
||||
"--disable-gpu", |
||||
], |
||||
}, |
||||
ChromeDebug: { |
||||
base: "Chrome", |
||||
flags: [ |
||||
"--no-sandbox", |
||||
"--remote-debugging-port=9222", |
||||
"--enable-logging", |
||||
"--user-data-dir=./karma-chrome", |
||||
"--v=1", |
||||
"--disable-background-timer-throttling", |
||||
"--disable-renderer-backgrounding", |
||||
"--proxy-bypass-list=*", |
||||
"--disable-web-security", |
||||
"--disable-gpu", |
||||
], |
||||
}, |
||||
}, |
||||
|
||||
// // start these browsers
|
||||
// // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
||||
browsers: [os.platform() === "win32" |
||||
&& parseFloat(os.release() |
||||
.split(".") |
||||
.slice(0, 2) |
||||
.join(".")) <= 6.1 |
||||
? "HeadlessChrome" : "ChromeHeadless"], |
||||
|
||||
retryLimit: 30, |
||||
|
||||
captureTimeout: 30000, |
||||
|
||||
// Continuous Integration mode
|
||||
// if true, Karma captures browsers, runs the tests and exits
|
||||
singleRun: true, |
||||
|
||||
// Concurrency level
|
||||
// how many browser should be started simultaneous
|
||||
concurrency: Infinity, |
||||
|
||||
webpack: webpackConfig, |
||||
|
||||
plugins: [ |
||||
"karma-webpack", |
||||
"karma-mocha", |
||||
"karma-chai", |
||||
"karma-chrome-launcher", |
||||
"karma-coverage", |
||||
"karma-htmlfile-reporter", |
||||
] |
||||
}); |
||||
}; |
@ -1,31 +1,31 @@
|
||||
/** |
||||
* Created by windy on 2018/01/23. |
||||
*/ |
||||
describe("dateFunctionTest", () => { |
||||
describe("dateFunctionTest", function () { |
||||
|
||||
beforeAll(() => { |
||||
before(function () { |
||||
|
||||
}); |
||||
|
||||
/** |
||||
* test_author_windy |
||||
*/ |
||||
it("getWeekNumber", () => { |
||||
expect(BI.print(BI.getDate(2005, 0, 1), "%Y-%W")).toBe("2004-53"); |
||||
expect(BI.print(BI.getDate(2005, 0, 2), "%Y-%W")).toBe("2004-53"); |
||||
expect(BI.print(BI.getDate(2005, 11, 31), "%Y-%W")).toBe("2005-52"); |
||||
expect(BI.print(BI.getDate(2007, 0, 1), "%Y-%W")).toBe("2007-01"); |
||||
expect(BI.print(BI.getDate(2007, 11, 30), "%Y-%W")).toBe("2007-52"); |
||||
expect(BI.print(BI.getDate(2007, 11, 31), "%Y-%W")).toBe("2008-01"); |
||||
expect(BI.print(BI.getDate(2008, 0, 1), "%Y-%W")).toBe("2008-01"); |
||||
expect(BI.print(BI.getDate(2008, 11, 28), "%Y-%W")).toBe("2008-52"); |
||||
expect(BI.print(BI.getDate(2008, 11, 29), "%Y-%W")).toBe("2009-01"); |
||||
expect(BI.print(BI.getDate(2008, 11, 30), "%Y-%W")).toBe("2009-01"); |
||||
expect(BI.print(BI.getDate(2008, 11, 31), "%Y-%W")).toBe("2009-01"); |
||||
expect(BI.print(BI.getDate(2009, 0, 1), "%Y-%W")).toBe("2009-01"); |
||||
expect(BI.print(BI.getDate(2009, 11, 31), "%Y-%W")).toBe("2009-53"); |
||||
expect(BI.print(BI.getDate(2010, 0, 1), "%Y-%W")).toBe("2009-53"); |
||||
expect(BI.print(BI.getDate(2010, 0, 2), "%Y-%W")).toBe("2009-53"); |
||||
expect(BI.print(BI.getDate(2010, 0, 3), "%Y-%W")).toBe("2009-53"); |
||||
it("getWeekNumber", function () { |
||||
expect(BI.print(BI.getDate(2005, 0, 1), "%Y-%W")).to.equal("2004-53"); |
||||
expect(BI.print(BI.getDate(2005, 0, 2), "%Y-%W")).to.equal("2004-53"); |
||||
expect(BI.print(BI.getDate(2005, 11, 31), "%Y-%W")).to.equal("2005-52"); |
||||
expect(BI.print(BI.getDate(2007, 0, 1), "%Y-%W")).to.equal("2007-01"); |
||||
expect(BI.print(BI.getDate(2007, 11, 30), "%Y-%W")).to.equal("2007-52"); |
||||
expect(BI.print(BI.getDate(2007, 11, 31), "%Y-%W")).to.equal("2008-01"); |
||||
expect(BI.print(BI.getDate(2008, 0, 1), "%Y-%W")).to.equal("2008-01"); |
||||
expect(BI.print(BI.getDate(2008, 11, 28), "%Y-%W")).to.equal("2008-52"); |
||||
expect(BI.print(BI.getDate(2008, 11, 29), "%Y-%W")).to.equal("2009-01"); |
||||
expect(BI.print(BI.getDate(2008, 11, 30), "%Y-%W")).to.equal("2009-01"); |
||||
expect(BI.print(BI.getDate(2008, 11, 31), "%Y-%W")).to.equal("2009-01"); |
||||
expect(BI.print(BI.getDate(2009, 0, 1), "%Y-%W")).to.equal("2009-01"); |
||||
expect(BI.print(BI.getDate(2009, 11, 31), "%Y-%W")).to.equal("2009-53"); |
||||
expect(BI.print(BI.getDate(2010, 0, 1), "%Y-%W")).to.equal("2009-53"); |
||||
expect(BI.print(BI.getDate(2010, 0, 2), "%Y-%W")).to.equal("2009-53"); |
||||
expect(BI.print(BI.getDate(2010, 0, 3), "%Y-%W")).to.equal("2009-53"); |
||||
}); |
||||
}); |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue