Skip to content

Instantly share code, notes, and snippets.

View reekoheek's full-sized avatar

Ganesha reekoheek

  • PT Sagara Xinix Solusitama
  • Jakarta
View GitHub Profile
@reekoheek
reekoheek / vite_wtr_repro_patch.diff
Created July 16, 2021 10:38
vite-web-test-runner-plugin sourcemap bug repro
diff --git a/examples/react/package.json b/examples/react/package.json
index a2e752b..9176945 100644
--- a/examples/react/package.json
+++ b/examples/react/package.json
@@ -6,7 +6,7 @@
"dev": "vite",
"build": "vite build",
"serve": "vite preview",
- "test": "web-test-runner \"src/**/*.test.jsx\" --coverage"
+ "test": "web-test-runner \"src/**/*.test.ts\" --coverage"
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Untitled benchmark</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Last active September 18, 2016 07:30
obj vs setPrototypeOf vs __proto__ vs new Obj #jsbench #jsperf (http://jsbench.github.io/#31557d49a265451ff356a56fbdfd7df5) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>obj vs setPrototypeOf vs __proto__ vs new Obj #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Last active September 16, 2016 12:35
const vs var #jsbench #jsperf (http://jsbench.github.io/#3bc837b1e239cf6d070b0711f0b79296) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>const vs var #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Last active September 16, 2016 11:00
new vs mixin vs object.create #jsbench #jsperf (http://jsbench.github.io/#1495d021336579c3e8f5b7dc83fd7dbe) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>new vs mixin vs object.create #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Created September 12, 2016 04:15
benchmark several object creation methods (http://jsbench.github.io/#42e7a8f01e4ad334354b764a1a64ae68) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>benchmark several object creation methods</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>iteration</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Created September 7, 2016 16:16
y === typeof x vs typeof x === y (http://jsbench.github.io/#6c1eb9f5bb813f2804772267bceeb89e) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>y === typeof x vs typeof x === y</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Last active June 22, 2018 07:27
Object.getOwnPropertyNames vs Object.keys #jsbench #jsperf (http://jsbench.github.io/#b6ea5f52a779ebac10bd7feb1e186482) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Object.getOwnPropertyNames vs Object.keys #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>
@reekoheek
reekoheek / index.html
Last active September 7, 2016 23:30
String#endsWith(x) vs String#substr(-1) === x vs x === String#substr(-1) #jsbench #jsperf (http://jsbench.github.io/#73ef9720ef1c9e60ece4ee07fddd39a3) #jsbench #jsperf
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>String#endsWith(x) vs String#substr(-1) === x vs x === String#substr(-1) #jsbench #jsperf</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script>
<script src="./suite.js"></script>
</head>
<body>
<h1>Open the console to view the results</h1>