Skip to content

Commit

Permalink
Test: Always use components.json (#2370)
Browse files Browse the repository at this point in the history
All test files now consistently import `components.json` instead of `components.js`. The JS file is generated and can be outdated. This can be annoying when you're adding a language.
  • Loading branch information
RunDevelopment authored May 22, 2020
1 parent 9c7bc82 commit e416341
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/aliases-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const { assert } = require("chai");
const PrismLoader = require('./helper/prism-loader');
const { languages } = require('./../components');
const { languages } = require('./../components.json');


function toArray(value) {
Expand Down
2 changes: 1 addition & 1 deletion tests/dependencies-test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { assert } = require('chai');
const getLoader = require('../dependencies');
const components = require('../components');
const components = require('../components.json');


describe('Dependency logic', function () {
Expand Down
2 changes: 1 addition & 1 deletion tests/helper/prism-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const fs = require("fs");
const vm = require("vm");
const { getAllFiles } = require("./test-discovery");
const components = require("../../components");
const components = require("../../components.json");
const getLoader = require("../../dependencies");
const languagesCatalog = components.languages;

Expand Down
2 changes: 1 addition & 1 deletion tests/pattern-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const { assert } = require('chai');
const PrismLoader = require('./helper/prism-loader');
const { BFS, parseRegex } = require('./helper/util');
const { languages } = require('../components');
const { languages } = require('../components.json');
const { visitRegExpAST } = require('regexpp');


Expand Down

0 comments on commit e416341

Please sign in to comment.