Skip to content

Commit

Permalink
Merge pull request #16 from pulsar-edit/fix-flaky-test
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioszabo authored Jun 23, 2023
2 parents 70bfe83 + ba70705 commit 1717027
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion 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(path.join(__dirname, 'fixtures', 'package-with-snippets')),
atom.packages.loadPackage('language-javascript')
jsPackage()
]);
});

Expand Down

0 comments on commit 1717027

Please sign in to comment.