This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe("When passing an unknown element type", () => { | |
it("Should throw error", () => { | |
const type = "unknown-type"; | |
const array = [1]; | |
expect(() => { | |
$sort([array, 0, <any>type]); | |
}).toThrowError(`Unknown array element type:${type}`); | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.ajax({url: "https://url", success: function(result){ | |
console.log(result); | |
$("#div1").html(result); | |
}}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function testSequential() { | |
async function f1 (){ | |
let promise = new Promise((resolve, reject) => { | |
setTimeout(()=>{resolve(2)}, 2000); | |
}); | |
return promise; | |
} | |
async function f2 (){ | |
let promise = new Promise((resolve, reject) => { | |
setTimeout(()=>{resolve(2)}, 2000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM jenkins | |
USER root | |
RUN apt-get update \ | |
&& apt-get install -y sudo apt-transport-https ca-certificates \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN echo "www-data ALL=NOPASSWD: ALL" >> /etc/sudoers | |
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
RUN echo "deb https://apt.dockerproject.org/repo debian-jessie main" > /etc/apt/sources.list.d/docker.list | |
RUN apt-get update |