X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=test%2Fspec%2Fmkws-index-simple.spec.js;h=a91acf71d39c6307e60be98c0f16997ee9db2cfb;hb=b9afacc19f8a204820638257807ba837113536cf;hp=7fd542f8c9871078c21823fb3084b9d7ed248ebe;hpb=f05c96324c54716ddbe5ceb4ea1c3361e11c0c6e;p=mkws-moved-to-github.git diff --git a/test/spec/mkws-index-simple.spec.js b/test/spec/mkws-index-simple.spec.js index 7fd542f..a91acf7 100644 --- a/test/spec/mkws-index-simple.spec.js +++ b/test/spec/mkws-index-simple.spec.js @@ -13,40 +13,40 @@ var utils = require("./mkws_utils.js"); * */ -function html_check (file, tags_array, ignore_doctype) { - var html = fs.readFileSync(file, "utf-8"); - var tags = utils.flat_list(tags_array); - - describe("index-full.html string test for " + file, function() { - it("html test", function() { - expect(html).toBeDefined(); - - // forgotten doctype declaration - if (!ignore_doctype) { - expect(html).toMatch(//); - expect(html).toMatch(/<\/html.*?>/); - } - expect(html).toMatch(//); - expect(html).toMatch(//); - expect(html).toMatch(/<\/head.*?>/); - expect(html).toMatch(/<\/body.*?>/); - - expect(html).toMatch(/.+<\/title>/i); - expect(html).toMatch(/'; - // console.log(data) - expect(html).toMatch(data); - } +function html_check(file, tags_array, ignore_doctype) { + var html = fs.readFileSync(file, "utf-8"); + var tags = utils.flat_list(tags_array); + + describe("language.html string test for " + file, function () { + it("html test", function () { + expect(html).toBeDefined(); + + // forgotten doctype declaration + if (!ignore_doctype) { + expect(html).toMatch(//); + expect(html).toMatch(/<\/html.*?>/); + } + expect(html).toMatch(//); + expect(html).toMatch(//); + expect(html).toMatch(/<\/head.*?>/); + expect(html).toMatch(/<\/body.*?>/); + + expect(html).toMatch(/.+<\/title>/i); + expect(html).toMatch(/'; + // console.log(data) + expect(html).toMatch(data); + } + }); }); - }); } -html_check('../examples/htdocs/index-full.html', [utils.tags.required, utils.tags.optional, utils.tags.optional2]); -html_check('../examples/htdocs/index-mobile.html', [utils.tags.required, utils.tags.optional]); -html_check('../examples/htdocs/index-popup.html', [], true); -html_check('../examples/htdocs/index-jquery.html', []); -html_check('../examples/htdocs/index-mike.html', [utils.tags.required, utils.tags.optional], true); +html_check('../examples/htdocs/language.html', [utils.tags.required, utils.tags.optional, utils.tags.optional2]); +html_check('../examples/htdocs/mobile.html', [utils.tags.required, utils.tags.optional]); +html_check('../examples/htdocs/popup.html', [], true); +html_check('../examples/htdocs/jquery.html', []); +// html_check('../examples/htdocs/mike.html', [utils.tags.required, utils.tags.optional], true);