Use native esm
This commit is contained in:
parent
c4354a6600
commit
70bd12a4d6
37 changed files with 379 additions and 119 deletions
|
@ -1,11 +1,12 @@
|
|||
import co from 'co';
|
||||
import models from '../models';
|
||||
import models from '../models/index.cjs';
|
||||
|
||||
import debugname from 'debug';
|
||||
const debug = debugname('match.audio:db');
|
||||
const debug = debugname('combine.fm:db');
|
||||
|
||||
co(async function sync() {
|
||||
debug('Syncing schema');
|
||||
await models.sequelize.sync();
|
||||
debug('Schema synced');
|
||||
models.sequelize.close();
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'should';
|
||||
import lookup from '../lib/lookup';
|
||||
import lookup from '../lib/lookup.js';
|
||||
|
||||
describe('Search with url', function(){
|
||||
it('should find album by url', async function (){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'should';
|
||||
import * as deezer from '../../lib/services/deezer';
|
||||
import * as deezer from '../../lib/services/deezer/index.js';
|
||||
|
||||
describe('Deezer', () => {
|
||||
describe('lookupId', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'should';
|
||||
import * as google from '../../lib/services/google';
|
||||
import * as google from '../../lib/services/google/index.js';
|
||||
|
||||
describe('Google Play Music', () => {
|
||||
describe('lookupId', () => {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
import 'should';
|
||||
import * as itunes from '../../lib/services/itunes';
|
||||
import * as itunes from '../../lib/services/itunes/index.js';
|
||||
|
||||
describe('iTunes Music', function(){
|
||||
describe('lookupId', function(){
|
||||
it('should find album by ID', async function (){
|
||||
const result = await itunes.lookupId('1445991287', 'album');
|
||||
console.log(result.name)
|
||||
result.name.should.equal('Peace Orchestra');
|
||||
});
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'should';
|
||||
import * as spotify from '../../lib/services/spotify';
|
||||
import * as spotify from '../../lib/services/spotify/index.js';
|
||||
|
||||
describe('Spotify', function(){
|
||||
describe('lookupId', function(){
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import 'should';
|
||||
import * as youtube from '../../lib/services/youtube';
|
||||
import * as youtube from '../../lib/services/youtube/index.js';
|
||||
|
||||
describe('Youtube', function(){
|
||||
describe('lookup', function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue