зеркало из https://github.com/mozilla/pluotsorbet.git
refactor more code
This commit is contained in:
Родитель
0df8774625
Коммит
8e087c16c8
|
@ -97,3 +97,28 @@ function checkFilesByDir() {
|
|||
checkNextDir();
|
||||
});
|
||||
}
|
||||
|
||||
// The complete list of paths we expect to find in the filesystem.
|
||||
// We check that they all exist.
|
||||
var paths = [
|
||||
"/",
|
||||
"/Persistent",
|
||||
"/_main.ks",
|
||||
];
|
||||
|
||||
// The files we expect to find in the filesystem, indexed by parent dir.
|
||||
// We check that the directories have the files we expect to find in them.
|
||||
var filesByDir = {
|
||||
"/": [
|
||||
"Persistent",
|
||||
"_main.ks",
|
||||
],
|
||||
|
||||
"/Persistent": [],
|
||||
};
|
||||
|
||||
function testInit() {
|
||||
checkPaths();
|
||||
checkFilesByDir();
|
||||
next();
|
||||
}
|
||||
|
|
|
@ -5,29 +5,7 @@
|
|||
|
||||
var APP_BASE_DIR = "../../";
|
||||
|
||||
// The complete list of paths we expect to find in the filesystem.
|
||||
// We check that they all exist.
|
||||
var paths = [
|
||||
"/",
|
||||
"/Persistent",
|
||||
"/_main.ks",
|
||||
];
|
||||
|
||||
// The files we expect to find in the filesystem, indexed by parent dir.
|
||||
// We check that the directories have the files we expect to find in them.
|
||||
var filesByDir = {
|
||||
"/": [
|
||||
"Persistent",
|
||||
"_main.ks",
|
||||
],
|
||||
|
||||
"/Persistent": [],
|
||||
};
|
||||
|
||||
checkPaths();
|
||||
checkFilesByDir();
|
||||
|
||||
initFS.then(function() {
|
||||
// We changed the name between versions, so use whichever is available.
|
||||
(fs.syncStore || fs.storeSync)(next);
|
||||
(fs.syncStore || fs.storeSync)(testInit);
|
||||
});
|
||||
|
|
|
@ -3,25 +3,4 @@
|
|||
|
||||
"use strict";
|
||||
|
||||
// The complete list of paths we expect to find in the filesystem.
|
||||
// We check that they all exist.
|
||||
var paths = [
|
||||
"/",
|
||||
"/Persistent",
|
||||
"/_main.ks",
|
||||
];
|
||||
|
||||
// The files we expect to find in the filesystem, indexed by parent dir.
|
||||
// We check that the directories have the files we expect to find in them.
|
||||
var filesByDir = {
|
||||
"/": [
|
||||
"Persistent",
|
||||
"_main.ks",
|
||||
],
|
||||
|
||||
"/Persistent": [],
|
||||
};
|
||||
|
||||
checkPaths();
|
||||
checkFilesByDir();
|
||||
fs.init(next);
|
||||
fs.init(testInit);
|
||||
|
|
Загрузка…
Ссылка в новой задаче