Browse Source

Ditch patch-settings for test

Noah 8 years ago
parent
commit
3de1ff9bbd
2 changed files with 6 additions and 25 deletions
  1. 0 16
      test/patch-settings.js
  2. 6 9
      test/server-test.js

+ 0 - 16
test/patch-settings.js View File

@@ -1,16 +0,0 @@
1
-var serverSettings = require("../lib/settings/");
2
-
3
-module.exports = function(newSettings) {
4
-  for (var key in serverSettings) {
5
-    if (!(key in newSettings)) {
6
-      delete serverSettings[key];
7
-    }
8
-  }
9
-
10
-  for (var key in newSettings) {
11
-    serverSettings[key] = newSettings[key];
12
-  }
13
-
14
-  return serverSettings;
15
-
16
-};

+ 6 - 9
test/server-test.js View File

@@ -4,15 +4,12 @@ var tape = require("tape"),
4 4
     queue = require("d3").queue,
5 5
     request = require("supertest");
6 6
 
7
-var fonts = require("../lib/settings/").fonts;
8
-
9
-var serverSettings = require("./patch-settings")({
10
-  workingDirectory: path.join(__dirname, "tmp", "working"),
11
-  maxUploadSize: 100000,
12
-  storagePath: path.join(__dirname, "tmp", "storage"),
13
-  worker: true,
14
-  fonts: fonts
15
-});
7
+var serverSettings = require("../lib/settings/");
8
+
9
+serverSettings.workingDirectory = path.join(__dirname, "tmp", "working");
10
+serverSettings.storagePath = path.join(__dirname, "tmp", "storage");
11
+serverSettings.maxUploadSize = 100000;
12
+serverSettings.worker = true;
16 13
 
17 14
 var server = require("../server");
18 15