Skip to content

Instantly share code, notes, and snippets.

View ottogutierrez's full-sized avatar

Otto Gutierrez ottogutierrez

View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>Mocha Tests</title>
<link rel="stylesheet" href="node_modules/mocha/mocha.css">
</head>
<body>
<div id="mocha"></div>
<script src="node_modules/mocha/mocha.js"></script>
<script src="node_modules/chai/chai.js"></script>
@ottogutierrez
ottogutierrez / package.json
Last active December 11, 2018 10:23
Adding the "start" script to the package.json
{
"name": "electron-testing",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "electron ."
},
"author": "",
"license": "ISC",
@ottogutierrez
ottogutierrez / index.html
Last active December 11, 2018 10:25
Basic HTML file for the electron-testing-js tutorial
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Electron Testing JS</title>
</head>
<body>
<h1>Electron Testing JS</h1>
<p>Welcome to the electron-testing-js Tutorial from ottogutierrez.com</p>
@ottogutierrez
ottogutierrez / index.js
Last active December 11, 2018 10:22
Basic Electron source file
const { app, BrowserWindow } = require('electron')
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let win
function createWindow () {
// Create the browser window.
win = new BrowserWindow({ width: 800, height: 600 })