-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from DFE-Digital/feature/complexity-refactors
♻️Complexity Refactors
- Loading branch information
Showing
26 changed files
with
3,480 additions
and
674 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
plugins: | ||
eslint: | ||
enabled: true | ||
config: | ||
config: ./eslintrc.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
lib | ||
node_modules | ||
coverage | ||
out | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ coverage | |
*DS_Store | ||
__tests__/__fixtures__/output.odp | ||
lib | ||
*.tgz | ||
*.tgz | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
trailingComma: "es5" | ||
trailingComma: "none" | ||
tabWidth: 2 | ||
semi: true | ||
singleQuote: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,8 @@ | |
], | ||
"extends": [ | ||
"plugin:jest/recommended" | ||
] | ||
], | ||
"rules": { | ||
"max-lines-per-function": "off" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,18 @@ | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import Presenation from '../src/Presentation'; | ||
import Slide from '../src/Slide'; | ||
|
||
const fixture = JSON.parse( | ||
fs.readFileSync(path.join(__dirname, "__fixtures__/example.json")) | ||
fs.readFileSync(path.join(__dirname, '__fixtures__/example.json')) | ||
); | ||
|
||
describe("Presentation", () => { | ||
describe('.slides', () => { | ||
it('creates an array of slides', () => { | ||
const presenation = new Presenation(fixture) | ||
let actual = presenation.slides | ||
|
||
expect(actual).toBeInstanceOf(Array) | ||
expect(actual[0]).toBeInstanceOf(Slide) | ||
}) | ||
}) | ||
}) | ||
describe('Presentation', () => { | ||
describe('.uniqueStyleIDs()', () => { | ||
it('renames style names with a prefixed ID', () => { | ||
let subject = new Presenation(fixture, 0); | ||
expect(JSON.stringify(subject.data)).toContain( | ||
'"text:style-name":"0-a1219"' | ||
); | ||
}); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.