This file contains 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
package com.orrz.unittest.model; | |
import java.io.*; | |
public class File { | |
private String path; | |
private BufferedReader reader; | |
private OutputStream out; | |
public File(String path) { |
This file contains 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
JSON 23 mins ██████████▉░░░░░░░░░░ 52.4% | |
Markdown 8 mins ████░░░░░░░░░░░░░░░░░ 19.6% | |
JavaScript 5 mins ██▋░░░░░░░░░░░░░░░░░░ 12.7% | |
Bash 3 mins █▍░░░░░░░░░░░░░░░░░░░ 6.7% | |
Other 1 min ▋░░░░░░░░░░░░░░░░░░░░ 3.4% |
This file contains 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
const makeQueue = () => { | |
let currentTask = Promise.resolve(); | |
// create a new promise so that errors can be bubbled | |
// up to the caller without being caught by the queue | |
return (fn) => | |
new Promise((resolve, reject) => { | |
currentTask = currentTask | |
.then(() => fn()) | |
.then(resolve) | |
.catch(reject); |