Use native esm

This commit is contained in:
Jonathan Cremin 2020-01-18 10:19:20 +00:00
parent c4354a6600
commit 70bd12a4d6
37 changed files with 379 additions and 119 deletions

View file

@ -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();
});

View file

@ -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 (){

View file

@ -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', () => {

View file

@ -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', () => {

View file

@ -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');
});

View file

@ -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(){

View file

@ -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(){