museria 0.2.41 → 0.2.42
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/client/museria.client.js +2 -2
- package/dist/face/museria.face.js +3 -3
- package/dist/face/style.css +1 -1
- package/package.json +1 -1
- package/src/node.js +2 -3
- package/src/server/transports/express/client/controllers.js +1 -1
- package/src/server/transports/express/midds.js +1 -1
- package/test/node.js +5 -9
package/dist/face/style.css
CHANGED
package/package.json
CHANGED
package/src/node.js
CHANGED
@@ -426,8 +426,7 @@ module.exports = (Parent) => {
|
|
426
426
|
* @returns {object[]}
|
427
427
|
*/
|
428
428
|
async getSongInfo(title, options = {}) {
|
429
|
-
title = utils.
|
430
|
-
this.songTitleTest(title);
|
429
|
+
title = utils.prepareComparisonSongTitle(title);
|
431
430
|
const collection = await this.getCollection('music');
|
432
431
|
const actions = utils.prepareDocumentGettingActions({
|
433
432
|
offset: 0,
|
@@ -472,7 +471,7 @@ module.exports = (Parent) => {
|
|
472
471
|
* @returns {object[]}
|
473
472
|
*/
|
474
473
|
async findSongs(str, options = {}) {
|
475
|
-
const title = utils.
|
474
|
+
const title = utils.prepareComparisonSongTitle(str);
|
476
475
|
str = utils.prepareSongFindingString(str);
|
477
476
|
|
478
477
|
if(str.length < this.options.music.findingStringMinLength) {
|
package/test/node.js
CHANGED
@@ -108,17 +108,13 @@ describe('Node', () => {
|
|
108
108
|
});
|
109
109
|
|
110
110
|
describe('.getSongInfo()', () => {
|
111
|
-
it('should
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}
|
116
|
-
catch (err) {
|
117
|
-
assert.isOk(err.message.match('Wrong song title'));
|
118
|
-
}
|
111
|
+
it('should return an empty array with a wrong title', async () => {
|
112
|
+
const title = 'unexistent';
|
113
|
+
const result = await node.getSongInfo(title);
|
114
|
+
assert.lengthOf(result, 0);
|
119
115
|
});
|
120
116
|
|
121
|
-
it('should return an empty array', async () => {
|
117
|
+
it('should return an empty array with a right title', async () => {
|
122
118
|
const title = 'unexistent - unexistent';
|
123
119
|
const result = await node.getSongInfo(title);
|
124
120
|
assert.lengthOf(result, 0);
|