From 5b5196f822b3c52d94f6f8e8292c5b709d3feb0b Mon Sep 17 00:00:00 2001 From: b-ma Date: Mon, 8 Jul 2024 17:16:17 +0200 Subject: [PATCH] chore: move fixtures into src --- apps/metronome/package.json | 1 + src/components/SoapScoreExamples.js | 2 +- {tests => src/utils}/fixtures.js | 0 tests/parser-augustin.spec.js | 2 +- tests/parser-midi.spec.js | 6 ++++-- tests/soap-score-parser.spec.js | 3 +-- tests/soap-score-writer.spec.js | 3 +-- tests/writer-asco.spec.js | 3 +-- 8 files changed, 10 insertions(+), 10 deletions(-) rename {tests => src/utils}/fixtures.js (100%) diff --git a/apps/metronome/package.json b/apps/metronome/package.json index 3c7c5a90..aade724e 100644 --- a/apps/metronome/package.json +++ b/apps/metronome/package.json @@ -11,6 +11,7 @@ "@ircam/sc-components": "^3.0.0-alpha.66", "@ircam/sc-loader": "^1.0.0", "@ircam/sc-scheduling": "^1.0.0", + "@ircam/soap-score": "^1.1.0", "lit": "^3.1.4" }, "name": "metronome" diff --git a/src/components/SoapScoreExamples.js b/src/components/SoapScoreExamples.js index 58a37f40..4146cf25 100644 --- a/src/components/SoapScoreExamples.js +++ b/src/components/SoapScoreExamples.js @@ -1,5 +1,5 @@ import { html, LitElement, css } from 'lit'; -import * as fixtures from '../../tests/fixtures.js'; +import * as fixtures from '../utils/fixtures.js'; import '@ircam/sc-components/sc-select.js'; // import '@ircam/sc-components/sc-text.js' diff --git a/tests/fixtures.js b/src/utils/fixtures.js similarity index 100% rename from tests/fixtures.js rename to src/utils/fixtures.js diff --git a/tests/parser-augustin.spec.js b/tests/parser-augustin.spec.js index 20dcd8e4..ec76db8a 100644 --- a/tests/parser-augustin.spec.js +++ b/tests/parser-augustin.spec.js @@ -1,7 +1,7 @@ import { assert } from 'chai'; import augustin2soap from '../src/parsers/augustin2soap.js'; -import { writeScore } from '../src/soap-score-writer.js'; +// import { writeScore } from '../src/utils/soap-score-writer.js'; import { parseScore } from '../src/soap-score-parser.js'; describe('soap.parse.augustin2soap', () => { diff --git a/tests/parser-midi.spec.js b/tests/parser-midi.spec.js index 01f372f4..6a1cd770 100644 --- a/tests/parser-midi.spec.js +++ b/tests/parser-midi.spec.js @@ -1,7 +1,7 @@ import { assert } from 'chai'; import midi2soap from '../src/parsers/midi2soap.js'; -import { writeScore } from '../src/soap-score-writer.js'; +// import { writeScore } from '../src/soap-score-writer.js'; import { parseScore } from '../src/soap-score-parser.js'; describe('soap.parse.midi2soap', () => { @@ -108,6 +108,7 @@ BAR 3 "section B" \ //console.log(outputScore); assert.deepEqual(outputData, expectedData); }); + it('## Example 2', () => { const input = [ { deltaTime: 0, type: 255, metaType: 88, data: [ 4, 2, 24, 8 ] }, @@ -125,7 +126,8 @@ BAR 1 [4/4] TEMPO [1/4]=120 "To Flute" //console.log(outputScore); assert.deepEqual(outputData, expectedData); }); - it.only('## Example 3', () => { + + it('## Example 3', () => { const input = [ { deltaTime: 0, type: 255, metaType: 88, data: [ 4, 2, 24, 8 ] }, { deltaTime: 0, type: 255, metaType: 81, data: 500000 }, diff --git a/tests/soap-score-parser.spec.js b/tests/soap-score-parser.spec.js index 6364c02a..42b074f9 100644 --- a/tests/soap-score-parser.spec.js +++ b/tests/soap-score-parser.spec.js @@ -1,8 +1,7 @@ import { assert } from 'chai'; import { parseScore } from '../src/soap-score-parser.js'; - -import * as fixtures from './fixtures.js'; +import * as fixtures from '../src/utils/fixtures.js'; describe(`> soap.parseScore(score)`, () => { describe('# Basics', () => { diff --git a/tests/soap-score-writer.spec.js b/tests/soap-score-writer.spec.js index 1363b66a..4a22131e 100644 --- a/tests/soap-score-writer.spec.js +++ b/tests/soap-score-writer.spec.js @@ -2,8 +2,7 @@ import { assert } from 'chai'; import { parseScore } from '../src/soap-score-parser.js'; import { writeScore } from '../src/soap-score-writer.js'; - -import * as fixtures from './fixtures.js'; +import * as fixtures from '../src/utils/fixtures.js'; describe('soap.writeScore', () => { describe('# Basics', () => { diff --git a/tests/writer-asco.spec.js b/tests/writer-asco.spec.js index 237d317a..59a2a376 100644 --- a/tests/writer-asco.spec.js +++ b/tests/writer-asco.spec.js @@ -3,8 +3,7 @@ import { assert } from 'chai'; import soap2asco from '../src/parsers/soap2asco.js'; import { writeScore } from '../src/soap-score-writer.js'; import { parseScore } from '../src/soap-score-parser.js'; - -import * as fixtures from './fixtures.js'; +import * as fixtures from '../src/utils/fixtures.js'; describe('soap.writeScore', () => { describe('# Basics', () => {