gitlab-org--gitlab-foss/spec/javascripts/notebook/lib/highlight_spec.js
Phil Hughes 4755f6066b Moved NotebookLab assets into repo
Moved all the notebooklab assets into the GitLab repo
2017-04-11 18:50:21 +01:00

15 lines
467 B
JavaScript

import Prism from '~/notebook/lib/highlight';
describe('Highlight library', () => {
it('imports python language', () => {
expect(Prism.languages.python).toBeDefined();
});
it('uses custom CSS classes', () => {
const el = document.createElement('div');
el.innerHTML = Prism.highlight('console.log("a");', Prism.languages.javascript);
expect(el.querySelector('.s')).not.toBeNull();
expect(el.querySelector('.nf')).not.toBeNull();
});
});