mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
Bump dependencies
Bumping eslint & configs meant making some linting fixes For future reference, the `xmlhttprequest-ssl` library must be of equal versioning to the one in `engine.io-client`, otherwise it won't be deduped which causes the socket.io tests to fail
This commit is contained in:
committed by
Julian Lam
parent
47bbe846cb
commit
da9da8190f
@@ -114,7 +114,7 @@ describe('minifier', function () {
|
||||
it('.css.bundle() should minify styles', function (done) {
|
||||
minifier.css.bundle(styles, paths, true, false, function (err, bundle) {
|
||||
assert.ifError(err);
|
||||
assert.strictEqual(bundle.code, '.help{margin:10px;display:block}.yellow{background:#ff0}.help .blue{background:#00f}');
|
||||
assert.strictEqual(bundle.code, '.help{margin:10px}.yellow{background:#ff0}.help{display:block}.help .blue{background:#00f}');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -46,20 +46,20 @@ describe('admin search', function () {
|
||||
describe('sanitize', function () {
|
||||
it('should strip out scripts', function (done) {
|
||||
assert.equal(
|
||||
search.sanitize('Pellentesque tristique senectus' +
|
||||
'<script>alert("nope");</script> habitant morbi'),
|
||||
'Pellentesque tristique senectus' +
|
||||
' habitant morbi'
|
||||
);
|
||||
search.sanitize('Pellentesque tristique senectus' +
|
||||
'<script>alert("nope");</script> habitant morbi'),
|
||||
'Pellentesque tristique senectus' +
|
||||
' habitant morbi'
|
||||
);
|
||||
done();
|
||||
});
|
||||
it('should remove all tags', function (done) {
|
||||
assert.equal(
|
||||
search.sanitize('<p>Pellentesque <b>habitant morbi</b> tristique senectus' +
|
||||
'Aenean <i>vitae</i> est.Mauris <a href="placerat">eleifend</a> leo.</p>'),
|
||||
'Pellentesque habitant morbi tristique senectus' +
|
||||
'Aenean vitae est.Mauris eleifend leo.'
|
||||
);
|
||||
search.sanitize('<p>Pellentesque <b>habitant morbi</b> tristique senectus' +
|
||||
'Aenean <i>vitae</i> est.Mauris <a href="placerat">eleifend</a> leo.</p>'),
|
||||
'Pellentesque habitant morbi tristique senectus' +
|
||||
'Aenean vitae est.Mauris eleifend leo.'
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
@@ -67,24 +67,20 @@ describe('admin search', function () {
|
||||
describe('simplify', function () {
|
||||
it('should remove all mustaches', function (done) {
|
||||
assert.equal(
|
||||
search.simplify(
|
||||
'Pellentesque tristique {{senectus}}habitant morbi' +
|
||||
'liquam tincidunt {mauris.eu}risus'
|
||||
),
|
||||
'Pellentesque tristique habitant morbi' +
|
||||
'liquam tincidunt risus'
|
||||
);
|
||||
search.simplify('Pellentesque tristique {{senectus}}habitant morbi' +
|
||||
'liquam tincidunt {mauris.eu}risus'),
|
||||
'Pellentesque tristique habitant morbi' +
|
||||
'liquam tincidunt risus'
|
||||
);
|
||||
done();
|
||||
});
|
||||
it('should collapse all whitespace', function (done) {
|
||||
assert.equal(
|
||||
search.simplify(
|
||||
'Pellentesque tristique habitant morbi' +
|
||||
' \n\n liquam tincidunt mauris eu risus.'
|
||||
),
|
||||
'Pellentesque tristique habitant morbi' +
|
||||
'\nliquam tincidunt mauris eu risus.'
|
||||
);
|
||||
search.simplify('Pellentesque tristique habitant morbi' +
|
||||
' \n\n liquam tincidunt mauris eu risus.'),
|
||||
'Pellentesque tristique habitant morbi' +
|
||||
'\nliquam tincidunt mauris eu risus.'
|
||||
);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -72,7 +72,8 @@ describe('socket.io', function () {
|
||||
helpers.connectSocketIO(res, function (err, _io) {
|
||||
io = _io;
|
||||
assert.ifError(err);
|
||||
done(err);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -654,8 +654,8 @@ describe('Topic\'s', function () {
|
||||
function (next) {
|
||||
topicPids = replies.map(function (reply) { return reply.pid; });
|
||||
socketTopics.bookmark({ uid: topic.userId }, { tid: newTopic.tid, index: originalBookmark }, next);
|
||||
}],
|
||||
done);
|
||||
},
|
||||
], done);
|
||||
});
|
||||
|
||||
it('should fail with invalid data', function (done) {
|
||||
@@ -711,7 +711,8 @@ describe('Topic\'s', function () {
|
||||
'Fork test, no bookmark update',
|
||||
topicPids.slice(1, 3),
|
||||
newTopic.tid,
|
||||
next);
|
||||
next
|
||||
);
|
||||
},
|
||||
function (forkedTopicData, next) {
|
||||
topics.getUserBookmark(newTopic.tid, topic.userId, next);
|
||||
|
||||
Reference in New Issue
Block a user