Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcodejongh authored and conorhastings committed Oct 22, 2018
1 parent 3c3bc0a commit cb38aec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
14 changes: 7 additions & 7 deletions __tests__/__snapshots__/prism-async.js.snap
Expand Up @@ -8,7 +8,7 @@ exports[`test SyntaxHighlighter renders jsx highlighted text 1`] = `
"WebkitHyphens": "none",
"background": "#f5f2f0",
"color": "black",
"fontFamily": "Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace",
"fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
"hyphens": "none",
"lineHeight": "1.5",
"margin": ".5em 0",
Expand All @@ -33,7 +33,7 @@ exports[`test SyntaxHighlighter renders jsx highlighted text 1`] = `
"WebkitHyphens": "none",
"background": "none",
"color": "black",
"fontFamily": "Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace",
"fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
"hyphens": "none",
"lineHeight": "1.5",
"msHyphens": "none",
Expand All @@ -46,8 +46,8 @@ exports[`test SyntaxHighlighter renders jsx highlighted text 1`] = `
"wordWrap": "normal"
}
}>
import React from \"react\";
import uniquePropHOC from \"./lib/unique-prop-hoc\";
import React from "react";
import uniquePropHOC from "./lib/unique-prop-hoc";
class Expire extends React.Component {
constructor(props) {
Expand Down Expand Up @@ -79,7 +79,7 @@ exports[`test SyntaxHighlighter should just render text if syntax is not registe
"WebkitHyphens": "none",
"background": "#f5f2f0",
"color": "black",
"fontFamily": "Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace",
"fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
"hyphens": "none",
"lineHeight": "1.5",
"margin": ".5em 0",
Expand All @@ -104,7 +104,7 @@ exports[`test SyntaxHighlighter should just render text if syntax is not registe
"WebkitHyphens": "none",
"background": "none",
"color": "black",
"fontFamily": "Consolas, Monaco, \'Andale Mono\', \'Ubuntu Mono\', monospace",
"fontFamily": "Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace",
"hyphens": "none",
"lineHeight": "1.5",
"msHyphens": "none",
Expand All @@ -117,7 +117,7 @@ exports[`test SyntaxHighlighter should just render text if syntax is not registe
"wordWrap": "normal"
}
}>
print(\'hello\')
print('hello')
</code>
</pre>
`;
Expand Down
2 changes: 0 additions & 2 deletions __tests__/prism-async.js
Expand Up @@ -45,8 +45,6 @@ test('SyntaxHighlighter should just render text if syntax is not registered', ()
});

test('When the code split is loaded - SyntaxHighlighter renders jsx highlighted text', async () => {
await SyntaxHighlighter.preload();

const tree = renderer.create(
<SyntaxHighlighter language="jsx" style={prism}>
{
Expand Down
2 changes: 1 addition & 1 deletion src/async-syntax-highlighter.js
Expand Up @@ -12,7 +12,7 @@ export default (options) => {
static languages = [];

static preload() {
ReactAsyncHighlighter.loadAstGenerator();
return ReactAsyncHighlighter.loadAstGenerator();
}

static registerLanguage = (_, language) => {
Expand Down

0 comments on commit cb38aec

Please sign in to comment.