Skip to content

Commit

Permalink
Remove useless factory functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Integral committed Aug 2, 2016
1 parent 0d9fa80 commit ed3b201
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions test/collab/SnapshotEngine.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ var TestMetaNode = require('../model/TestMetaNode');

var testSnapshotEngine = require('./testSnapshotEngine');
var testSnapshotEngineWithStore = require('./testSnapshotEngineWithStore');
var createTestDocumentFactory = require('../fixtures/createTestDocumentFactory');
var twoParagraphs = require('../fixtures/twoParagraphs');
var documentStoreSeed = require('../fixtures/documentStoreSeed');
var changeStoreSeed = require('../fixtures/changeStoreSeed');
var snapshotStoreSeed = require('../fixtures/snapshotStoreSeed');
Expand All @@ -30,7 +28,6 @@ configurator.defineSchema({
});
configurator.addNode(TestMetaNode);

var documentFactory = createTestDocumentFactory(twoParagraphs);
var documentStore = new DocumentStore();
var changeStore = new ChangeStore();
var snapshotEngine = new SnapshotEngine({
Expand Down Expand Up @@ -72,9 +69,9 @@ function setupTest(description, fn) {
}

// Run the generic testsuite with an engine that does not have a store attached
testSnapshotEngine(snapshotEngine, documentFactory, setupTest);
testSnapshotEngine(snapshotEngine, setupTest);
// Run the same testsuite but this time with a store
testSnapshotEngine(snapshotEngineWithStore, documentFactory, setupTest);
testSnapshotEngine(snapshotEngineWithStore, setupTest);

// Run tests that are only relevant when a snapshot store is provided to the engine
testSnapshotEngineWithStore(snapshotEngineWithStore, documentFactory, setupTest);
testSnapshotEngineWithStore(snapshotEngineWithStore, setupTest);
2 changes: 1 addition & 1 deletion test/collab/testSnapshotEngine.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';
// Please see snapshotStoreSeed.js for the used fixture data

function testSnapshotEngine(snapshotEngine, docFactory, test) {
function testSnapshotEngine(snapshotEngine, test) {
test('Compute a new snapshot', function(t) {
snapshotEngine.getSnapshot({documentId: 'test-doc'}, function(err, snapshot) {
t.notOk(err, 'There should be no error');
Expand Down
2 changes: 1 addition & 1 deletion test/collab/testSnapshotEngineWithStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// Please see snapshotStoreSeed.js for the used fixture data

function testSnapshotEngineWithPersistence(snapshotEngine, docFactory, test) {
function testSnapshotEngineWithPersistence(snapshotEngine, test) {
test('Compute a new snapshot', function(t) {
snapshotEngine.getSnapshot({documentId: 'test-doc'}, function(err, snapshot) {
t.notOk(err, 'There should be no error');
Expand Down

0 comments on commit ed3b201

Please sign in to comment.