??д??????JavaScript????
???????????? ???????[ 2016/6/2 15:03:04 ] ????????Javascript web????
?????????в?????????length ???????????????????????ū?????????????????????????β????? dataStore ??????????????????????????????????? length ????????????????к??????????????????????????????????? setup ???? teardown ?????????? dataStore ????????????????????????????????????? dataStore ??????????????????????????????塣????????????£?
????JavaScript
????function newDataStore() {
????var data = [];
????return {
????push: function (item) {
????data.push(item);
????}??
????pop: function() {
????return data.pop();
????}??
????length: function() {
????return data.length;
????}
????};
????}
????var dataStore = newDataStore();
????function newDataStore() {
????var data = [];
????return {
????push: function (item) {
????data.push(item);
????}??
????pop: function() {
????return data.pop();
????}??
????length: function() {
????return data.length;
????}
????};
????}
????var dataStore = newDataStore();
?????????????????????????£?
????JavaScript
????module("dataStore");
????test("pop"?? function() {
????var dataStore = newDataStore();
????dataStore.push("foo");
????dataStore.push("bar")
????equal(dataStore.pop()?? "bar"?? "popping returns the most-recently pushed item");
????});
????test("length"?? function() {
????var dataStore = newDataStore();
????dataStore.push("foo");
????equal(dataStore.length()?? 1?? "adding 1 item makes the length 1");
????});
????module("dataStore");
????test("pop"?? function() {
????var dataStore = newDataStore();
????dataStore.push("foo");
????dataStore.push("bar")
????equal(dataStore.pop()?? "bar"?? "popping returns the most-recently pushed item");
????});
????test("length"?? function() {
????var dataStore = newDataStore();
????dataStore.push("foo");
????equal(dataStore.length()?? 1?? "adding 1 item makes the length 1");
????});
???????????????? dataStore ????????????????£?????????????????????????????????????DataStore ?????????????????????????????????
?????????????????????
??????????????????????? ?? JavaScript ?н???????????г????????????????????????????????????????????????????????????????????????????????????????′?????????????????????????????????????????????????к????????????в?????????????μ????
????JavaScript
????function Templater() {
????function supplant(str?? params) {
????for (var prop in params) {
????str.split("{" + prop +"}").join(params[prop]);
????}
????return str;
????}
????var templates = {};
????this.defineTemplate = function(name?? template) {
????templates[name] = template;
????};
????this.render = function(name?? params) {
????if (typeof templates[name] !== "string") {
????throw "Template " + name + " not found!";
????}
????return supplant(templates[name]?? params);
????};
????}
????function Templater() {
????function supplant(str?? params) {
????for (var prop in params) {
????str.split("{" + prop +"}").join(params[prop]);
????}
????return str;
????}
????var templates = {};
????this.defineTemplate = function(name?? template) {
????templates[name] = template;
????};
????this.render = function(name?? params) {
????if (typeof templates[name] !== "string") {
????throw "Template " + name + " not found!";
????}
????return supplant(templates[name]?? params);
????};
????}
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Web?????????????????Web????????????????Docker Compose???????Web???????WEB?????ΧС??APP??????WEB????WEB???????????????WEB??????APP?????????Web??????????Web????????????Linux?????′?Java Web???????WEB?????ΧWeb?????Χ???Web??????????????HTTP(1)????Э??Web?????е?A/B?????????????????Web??????????Web??????ò?????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????