npm run format
This commit is contained in:
parent
eda901ba4a
commit
d09b97db41
|
@ -97,8 +97,9 @@ $(document).ready(function() {
|
|||
function populateFileList(file) {
|
||||
try {
|
||||
file = JSON.parse(file);
|
||||
} catch (e) {
|
||||
return;
|
||||
}
|
||||
catch (e) { return }
|
||||
|
||||
const row = document.createElement('tr');
|
||||
const name = document.createElement('td');
|
||||
|
|
|
@ -24,7 +24,8 @@ const conf = convict({
|
|||
},
|
||||
sentry_id: {
|
||||
format: String,
|
||||
default: 'https://cdf9a4f43a584f759586af8ceb2194f2@sentry.prod.mozaws.net/238',
|
||||
default:
|
||||
'https://cdf9a4f43a584f759586af8ceb2194f2@sentry.prod.mozaws.net/238',
|
||||
env: 'P2P_SENTRY_CLIENT'
|
||||
},
|
||||
sentry_dsn: {
|
||||
|
|
|
@ -45,9 +45,12 @@ app.get('/', (req, res) => {
|
|||
|
||||
app.get('/exists/:id', (req, res) => {
|
||||
const id = req.params.id;
|
||||
storage.exists(id).then(() => {
|
||||
res.sendStatus(200);
|
||||
}).catch(err => res.sendStatus(404));
|
||||
storage
|
||||
.exists(id)
|
||||
.then(() => {
|
||||
res.sendStatus(200);
|
||||
})
|
||||
.catch(err => res.sendStatus(404));
|
||||
});
|
||||
|
||||
app.get('/download/:id', (req, res) => {
|
||||
|
|
|
@ -44,16 +44,18 @@ const storage = proxyquire('../server/storage', {
|
|||
describe('Testing Exists from local filesystem', function() {
|
||||
it('Exists returns true when file exists', function() {
|
||||
exists.callsArgWith(1, null, 1);
|
||||
return storage.exists('test')
|
||||
.then(() => assert(1))
|
||||
.catch(err => assert.fail())
|
||||
return storage
|
||||
.exists('test')
|
||||
.then(() => assert(1))
|
||||
.catch(err => assert.fail());
|
||||
});
|
||||
|
||||
it('Exists returns false when file does not exist', function() {
|
||||
exists.callsArgWith(1, null, 0);
|
||||
return storage.exists('test')
|
||||
.then(() => assert.fail())
|
||||
.catch(err => assert(1))
|
||||
return storage
|
||||
.exists('test')
|
||||
.then(() => assert.fail())
|
||||
.catch(err => assert(1));
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue