UNPKG

react-chart-editor

Version:

plotly.js chart editor react component UI

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