music-library-index
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -253,4 +253,2 @@ var removeDiacritics = require('diacritics').remove; | ||
if (query.length === 0) return this; | ||
var searchResults = new MusicLibraryIndex({ | ||
@@ -257,0 +255,0 @@ searchFields: this.searchFields, |
{ | ||
"name": "music-library-index", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "build a searchable javascript object model given track metadata objects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -371,1 +371,38 @@ var assert = require('assert'); | ||
}); | ||
describe("unknown artist, unknown album", function() { | ||
var library = new MusicLibraryIndex(); | ||
library.addTrack({ | ||
key: 'imnd-sxde', | ||
name: '01 Shining Armor', | ||
artistName: '', | ||
albumArtistName: '', | ||
albumName: '', | ||
}); | ||
library.addTrack({ | ||
key: 'jakg-nbfg', | ||
name: '02 Weird Kids', | ||
artistName: '', | ||
albumArtistName: '', | ||
albumName: '', | ||
}); | ||
library.rebuild(); | ||
var results = library; | ||
it("should be put into the same album", check); | ||
library.search("n"); | ||
results = library.search(""); | ||
it("searching should not affect anything", check); | ||
function check() { | ||
assert.strictEqual(results.artistList.length, 1); | ||
assert.strictEqual(results.artistList[0].albumList.length, 1); | ||
assert.strictEqual(results.artistList[0].albumList[0].trackList.length, 2); | ||
assert.strictEqual(results.artistList[0].albumList[0].trackList[0].album.trackList.length, 2); | ||
} | ||
}); |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
26578
651
0