codecamp

Nightwatch.Js

Nightwatch.js是一个测试 web app 和 web 站点的自动化测试框架, 使用 Node.js 编写, 基于 Selenium WebDriver API. 它是一个完整的浏览器端真实用户场景测试解决方案,致力于简化继续集成和编写自动化测试
AVA
Testcafe
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定
目录

JS运行时

Pug

关闭

MIP.setData({ 'pageTheme' : getCookie('pageTheme') || {'day':true, 'night':false}, 'pageFontSize' : getCookie('pageFontSize') || 20 }); MIP.watch('pageTheme', function(newValue){ setCookie('pageTheme', JSON.stringify(newValue)) }); MIP.watch('pageFontSize', function(newValue){ setCookie('pageFontSize', newValue) }); function setCookie(name, value){ var days = 1; var exp = new Date(); exp.setTime(exp.getTime() + days*24*60*60*1000); document.cookie = name + '=' + value + ';expires=' + exp.toUTCString(); } function getCookie(name){ var reg = new RegExp('(^| )' + name + '=([^;]*)(;|$)'); return document.cookie.match(reg) ? JSON.parse(document.cookie.match(reg)[2]) : null; }