Verified Commit 1c4c9ca4 authored by Aral Balkan's avatar Aral Balkan
Browse files

Update the test index page and its unit test

parent 5694014d
......@@ -6,8 +6,6 @@ const https = require('https')
const fs = require('fs')
const path = require('path')
const indexHTML = "<!DOCTYPE html><html lang='en'><head><title>Test</title><body><h1>Test</h1></body></html>"
async function secureGet (url) {
return new Promise((resolve, reject) => {
......@@ -127,7 +125,7 @@ test('serve method', t => {
t.equal(response.statusCode, 200, 'request succeeds')
t.equal(response.body, indexHTML, 'index loads')
t.equal(response.body.replace(/\s/g, ''), fs.readFileSync(path.join(__dirname, 'site', 'index.html'), 'utf-8').replace(/\s/g, ''), 'index loads')
// Test custom 404 page.
This diff is collapsed.
<!DOCTYPE html><html lang='en'><head><title>Test</title><body><h1>Test</h1></body></html>
\ No newline at end of file
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
html {font-family: sans-serif; background-color: #eae7e1}
body {display: grid; align-items: center; justify-content: center; height: 100vh; vertical-align: top; margin: 0;}
main {padding-left: 2vw; padding-right: 2vw; display: grid; justify-items: center;}
p {text-align: center;}
<img src="happy-monster.svg" alt="Pink monster, happy.">
<p><strong>Hello!</strong> Welcome to your Indie Web Server.</p>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment