Skip to content

Commit

Permalink
moved test dir out of src dir
Browse files Browse the repository at this point in the history
  • Loading branch information
Seanitzel committed Apr 3, 2021
1 parent 8b5b8dd commit 0f414f3
Show file tree
Hide file tree
Showing 21 changed files with 25 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .mocharc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"require": [
"@babel/register",
"ts-node/register",
"./src/test/bootstrap.js"
"./test/bootstrap.js"
]
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"webpack:build": "webpack --mode production",
"ts:build": "tsc -p tsconfig.json",
"ts:watch": "tsc --watch",
"test": "cross-env mocha -r ts-node/register -r esm \"src/test/**/*.spec.js\"",
"test": "cross-env mocha -r ts-node/register -r esm \"test/**/*.spec.js\"",
"coverage": "cross-env NODE_ENV=test nyc npm run test -- --reporter landing --cache",
"report": "nyc report --root coverage --format html",
"docs": "typedoc",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Measure from '../../notation/Measure'
import { InvalidInput } from '../../Exceptions'
import Measure from '../../src/notation/Measure'
import { InvalidInput } from '../../src/Exceptions'


describe('Measure', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Measure, Score, ScoreHandler } from '../..'
import { Measure, Score, ScoreHandler } from '../../src'

describe('Score Handler', () => {
let score, measure, chordMeasure
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Measure, Score } from '../..'
import { Measure, Score } from '../../src'

describe('Score', () => {
let score
Expand Down
4 changes: 2 additions & 2 deletions src/test/theory/chord.spec.js → test/theory/chord.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Chord, PitchClass } from '../..'
import { InvalidInput } from '../../Exceptions'
import { Chord, PitchClass } from '../../src'
import { InvalidInput } from '../../src/Exceptions'

const c = new PitchClass('c')

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { GuitarChordPattern, PitchClass } from '../..'
import { GuitarChordPattern, PitchClass } from '../../src'

describe('Guitar Chord Pattern', () => {
let c, g, gcp
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { MusicalPattern, PitchClass } from '../../'
import { MusicalPattern, PitchClass } from '../../src'

describe('Musical Pattern', () => {
describe('#constructor', () => {
Expand Down
4 changes: 2 additions & 2 deletions src/test/theory/note.spec.js → test/theory/note.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Note } from '../../'
import { InvalidInput } from '../../Exceptions'
import { Note } from '../../src'
import { InvalidInput } from '../../src/Exceptions'
import { testIntervals } from '../Helpers'

let c
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PitchClass } from '../../'
import { InvalidInput } from '../../Exceptions'
import { PitchClass } from '../../src'
import { InvalidInput } from '../../src/Exceptions'
import { testIntervals } from '../Helpers'

describe('PitchClass', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Chord, PitchClass, Scale } from '../../'
import { Chord, PitchClass, Scale } from '../../src/'

describe('Scale', () => {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
firstToUpper, fitArrayToSize, longestArray, mapString, rearrangeArray, switchMembers, twoDigitFormat
} from '../../utilities'
} from '../../src/utilities'

describe('general-functions', () => {
it('#firstToUpper', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
extractOctave, extractPitchClass, getPitchClassesInterval, intervalsToNotes, notesInRange, noteToObject,
pitchClassesToNotes, pitchClassesToPianoChordNotes, transposeNote
} from '../../utilities'
import { Chord, PitchClass } from '../../theory'
} from '../../src/utilities'
import { Chord, PitchClass } from '../../src/theory'

describe('Music addon functions', () => {
describe('#getPitchClassesInterval', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {
enharmonicPitchClass, getNotesInterval, getPatternFromNotes, getPatternFromPitchClasses, normalizePitchClass, toFlat
} from '../../utilities'
} from '../../src/utilities'

describe('#PureMusicUtils', () => {
describe('#enharmonicPitchClass', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as funcs from '../../utilities/ScientificFunctions'
import * as funcs from '../../src/utilities/ScientificFunctions'

describe('Scientific functions', () => {
it('#freqFromPitch', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PatternRule } from '../../'
import { InvalidInput } from '../../Exceptions'
import { PatternRule } from '../../src'
import { InvalidInput } from '../../src/Exceptions'

describe('Pattern Rule', () => {
describe('#isPattern', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { PitchClassRule } from '../../validation'
import { PitchClassRule } from '../../src/validation'

describe('Pitch Class Rule', () => {
it('should return true when valid', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PitchClass, validateDuration, validateInstance, validateRawNote } from '../../'
import { InvalidInput } from '../../Exceptions'
import { PitchClass, validateDuration, validateInstance, validateRawNote } from '../../src'
import { InvalidInput } from '../../src/Exceptions'

describe('#Validators', () => {
describe('#validateInstance', () => {
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"noFallthroughCasesInSwitch": true,
"pretty": true,
"resolveJsonModule": true,
"rootDir": "src",
"paths": {
"src": ["./src"],
"tone": ["node_modules/tone"]
Expand Down

0 comments on commit 0f414f3

Please sign in to comment.