Skip to content

Commit

Permalink
Forcing language-javascript to be on node_modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioszabo committed Jun 20, 2023
1 parent cfc61fd commit ba70705
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions spec/snippet-loading-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,19 @@ describe("Snippet Loading", () => {
});

describe("::loadPackageSnippets(callback)", () => {
const jsPackage = () => {
const pack = atom.packages.loadPackage('language-javascript')
pack.path = path.join(
atom.getLoadSettings().resourcePath,
'node_modules', 'language-javascript'
)
return pack
}

beforeEach(() => { // simulate a list of packages where the javascript core package is returned at the end
atom.packages.getLoadedPackages.andReturn([
atom.packages.loadPackage('language-javascript'),
atom.packages.loadPackage(path.join(__dirname, 'fixtures', 'package-with-snippets'))
atom.packages.loadPackage(path.join(__dirname, 'fixtures', 'package-with-snippets')),
jsPackage()
]);
});

Expand Down

0 comments on commit ba70705

Please sign in to comment.