Skip to content

Commit

Permalink
Create CoffeeToCode.js (#184)
Browse files Browse the repository at this point in the history
  • Loading branch information
dollyjung authored Oct 30, 2022
1 parent b711680 commit 9f76d8f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions PostmanTestScript/CoffeeToCode.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
pm.test("Convert Coffee to Code", function () {
var input = "Coffee";
console.log(input);
console.log("Drink coffee up ! :D");
const regex = /Coffee/ig;
//var output = input.replaceAll('ffe','d');
var output = input.replaceAll(regex,'Code');
console.log(output);
pm.expect(output).to.eql("Code");
});

0 comments on commit 9f76d8f

Please sign in to comment.