@eeacms/react-chart-editor
Version:
plotly.js chart editor react component UI
2 lines • 1.56 kB
JavaScript
;var _fs=_interopRequireDefault(require("fs"));var _glob=_interopRequireDefault(require("glob"));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}(function(){var enterModule=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.enterModule:undefined;enterModule&&enterModule(module)})();var __signature__=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.default.signature:function(a){return a};const BLACK_LIST=["fdescribe","fit","xdescribe","xit","it\\.only","describe\\.only"];const REGEXS=BLACK_LIST.map(token=>new RegExp("^\\s*".concat(token,"\\(.*")));describe("Syntax and test validation",()=>{describe("ensures ".concat(BLACK_LIST," is not present in tests"),()=>{const files=_glob.default.sync("!(node_modules|examples)/**/__tests__/*.js");files.forEach(file=>it("checks ".concat(file," for test checks"),()=>{const code=_fs.default.readFileSync(file,{encoding:"utf-8"});code.split("\n").forEach(line=>{expect(REGEXS.some(re=>re.test(line))).toBe(false)})}))})});;(function(){var reactHotLoader=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.default:undefined;if(!reactHotLoader){return}reactHotLoader.register(BLACK_LIST,"BLACK_LIST","/react-chart-editor/src/__tests__/syntax-test.js");reactHotLoader.register(REGEXS,"REGEXS","/react-chart-editor/src/__tests__/syntax-test.js")})();;(function(){var leaveModule=typeof reactHotLoaderGlobal!=="undefined"?reactHotLoaderGlobal.leaveModule:undefined;leaveModule&&leaveModule(module)})();
//# sourceMappingURL=syntax-test.js.map