repo stringlengths 5 106 | file_url stringlengths 78 301 | file_path stringlengths 4 211 | content stringlengths 0 32.8k | language stringclasses 1
value | license stringclasses 7
values | commit_sha stringlengths 40 40 | retrieved_at stringdate 2026-01-04 14:56:49 2026-01-05 02:23:25 | truncated bool 2
classes |
|---|---|---|---|---|---|---|---|---|
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/application-delegate-spec.js | spec/application-delegate-spec.js | /** @babel */
import ApplicationDelegate from '../src/application-delegate';
describe('ApplicationDelegate', function() {
describe('set/getTemporaryWindowState', function() {
it('can serialize object trees containing redundant child object references', async function() {
const applicationDelegate = new Ap... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/panel-spec.js | spec/panel-spec.js | const Panel = require('../src/panel');
describe('Panel', () => {
class TestPanelItem {
getElement() {
if (!this.element) {
this.element = document.createElement('div');
this.element.tabIndex = -1;
this.element.className = 'test-root';
}
return this.element;
}
}
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/git-repository-spec.js | spec/git-repository-spec.js | const path = require('path');
const fs = require('fs-plus');
const temp = require('temp').track();
const GitRepository = require('../src/git-repository');
const Project = require('../src/project');
describe('GitRepository', () => {
let repo;
beforeEach(() => {
const gitPath = path.join(temp.dir, '.git');
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/text-editor-spec.js | spec/text-editor-spec.js | const fs = require('fs');
const path = require('path');
const temp = require('temp').track();
const dedent = require('dedent');
const { clipboard } = require('electron');
const os = require('os');
const TextEditor = require('../src/text-editor');
const TextBuffer = require('text-buffer');
const TextMateLanguageMode = r... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/package-spec.js | spec/package-spec.js | const path = require('path');
const Package = require('../src/package');
const ThemePackage = require('../src/theme-package');
const { mockLocalStorage } = require('./spec-helper');
describe('Package', function() {
const build = (constructor, packagePath) =>
new constructor({
path: packagePath,
packa... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/jasmine-list-reporter.js | spec/jasmine-list-reporter.js | const { TerminalReporter } = require('jasmine-tagged');
class JasmineListReporter extends TerminalReporter {
fullDescription(spec) {
let fullDescription = 'it ' + spec.description;
let currentSuite = spec.suite;
while (currentSuite) {
fullDescription = currentSuite.description + ' > ' + fullDescrip... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/file-system-blob-store-spec.js | spec/file-system-blob-store-spec.js | const temp = require('temp').track();
const path = require('path');
const fs = require('fs-plus');
const FileSystemBlobStore = require('../src/file-system-blob-store');
describe('FileSystemBlobStore', function() {
let [storageDirectory, blobStore] = [];
beforeEach(function() {
storageDirectory = temp.path('at... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/theme-manager-spec.js | spec/theme-manager-spec.js | const path = require('path');
const fs = require('fs-plus');
const temp = require('temp').track();
describe('atom.themes', function() {
beforeEach(function() {
spyOn(atom, 'inSpecMode').andReturn(false);
spyOn(console, 'warn');
});
afterEach(function() {
waitsForPromise(() => atom.themes.deactivateT... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/default-directory-provider-spec.js | spec/default-directory-provider-spec.js | const DefaultDirectoryProvider = require('../src/default-directory-provider');
const path = require('path');
const fs = require('fs-plus');
const temp = require('temp').track();
describe('DefaultDirectoryProvider', function() {
let tmp = null;
beforeEach(() => (tmp = temp.mkdirSync('atom-spec-default-dir-provider... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/atom-protocol-handler-spec.js | spec/atom-protocol-handler-spec.js | describe('"atom" protocol URL', () =>
it('sends the file relative in the package as response', function() {
let called = false;
const request = new XMLHttpRequest();
request.addEventListener('load', () => (called = true));
request.open('GET', 'atom://async/package.json', true);
request.send();
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/selection-spec.js | spec/selection-spec.js | const TextEditor = require('../src/text-editor');
describe('Selection', () => {
let buffer, editor, selection;
beforeEach(() => {
buffer = atom.project.bufferForPathSync('sample.js');
editor = new TextEditor({ buffer, tabLength: 2 });
selection = editor.getLastSelection();
});
afterEach(() => buf... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/workspace-element-spec.js | spec/workspace-element-spec.js | /** @babel */
const { ipcRenderer } = require('electron');
const etch = require('etch');
const path = require('path');
const temp = require('temp').track();
const { Disposable } = require('event-kit');
const getNextUpdatePromise = () => etch.getScheduler().nextUpdatePromise;
describe('WorkspaceElement', () => {
af... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/history-manager-spec.js | spec/history-manager-spec.js | const { HistoryManager, HistoryProject } = require('../src/history-manager');
const StateStore = require('../src/state-store');
describe('HistoryManager', () => {
let historyManager, commandRegistry, project, stateStore;
let commandDisposable, projectDisposable;
beforeEach(async () => {
commandDisposable = ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/package-manager-spec.js | spec/package-manager-spec.js | const path = require('path');
const url = require('url');
const Package = require('../src/package');
const PackageManager = require('../src/package-manager');
const temp = require('temp').track();
const fs = require('fs-plus');
const { Disposable } = require('atom');
const { buildKeydownEvent } = require('../src/keymap... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/gutter-spec.js | spec/gutter-spec.js | const Gutter = require('../src/gutter');
describe('Gutter', () => {
const fakeGutterContainer = {
scheduleComponentUpdate() {}
};
const name = 'name';
describe('::hide', () =>
it('hides the gutter if it is visible.', () => {
const options = {
name,
visible: true
};
co... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/text-mate-language-mode-spec.js | spec/text-mate-language-mode-spec.js | const NullGrammar = require('../src/null-grammar');
const TextMateLanguageMode = require('../src/text-mate-language-mode');
const TextBuffer = require('text-buffer');
const { Point } = TextBuffer;
const _ = require('underscore-plus');
const dedent = require('dedent');
describe('TextMateLanguageMode', () => {
let lan... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/dock-spec.js | spec/dock-spec.js | /** @babel */
import etch from 'etch';
const Grim = require('grim');
const getNextUpdatePromise = () => etch.getScheduler().nextUpdatePromise;
describe('Dock', () => {
describe('when a dock is activated', () => {
it('opens the dock and activates its active pane', () => {
jasmine.attachToDOM(atom.workspa... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/window-event-handler-spec.js | spec/window-event-handler-spec.js | const KeymapManager = require('atom-keymap');
const WindowEventHandler = require('../src/window-event-handler');
const { conditionPromise } = require('./async-spec-helpers');
describe('WindowEventHandler', () => {
let windowEventHandler;
beforeEach(() => {
atom.uninstallWindowEventHandler();
spyOn(atom, '... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/buffered-node-process-spec.js | spec/buffered-node-process-spec.js | /* eslint-disable no-new */
const path = require('path');
const BufferedNodeProcess = require('../src/buffered-node-process');
describe('BufferedNodeProcess', function() {
it('executes the script in a new process', function() {
const exit = jasmine.createSpy('exitCallback');
let output = '';
const stdout... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/keymap-extensions-spec.js | spec/keymap-extensions-spec.js | const temp = require('temp').track();
const fs = require('fs-plus');
describe('keymap-extensions', function() {
beforeEach(function() {
atom.keymaps.configDirPath = temp.path('atom-spec-keymap-ext');
fs.writeFileSync(atom.keymaps.getUserKeymapPath(), '#');
this.userKeymapLoaded = function() {};
atom.... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/reopen-project-menu-manager-spec.js | spec/reopen-project-menu-manager-spec.js | /** @babel */
import { Disposable } from 'event-kit';
const ReopenProjectMenuManager = require('../src/reopen-project-menu-manager');
function numberRange(low, high) {
const size = high - low;
const result = new Array(size);
for (var i = 0; i < size; i++) result[i] = low + i;
return result;
}
describe('Reop... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/panel-container-element-spec.js | spec/panel-container-element-spec.js | 'use strict';
const Panel = require('../src/panel');
const PanelContainer = require('../src/panel-container');
describe('PanelContainerElement', () => {
let jasmineContent, element, container;
class TestPanelContainerItem {}
class TestPanelContainerItemElement_ extends HTMLElement {
connectedCallback() {
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/pane-spec.js | spec/pane-spec.js | const { extend } = require('underscore-plus');
const { Emitter } = require('event-kit');
const Grim = require('grim');
const Pane = require('../src/pane');
const PaneContainer = require('../src/pane-container');
const { conditionPromise, timeoutPromise } = require('./async-spec-helpers');
describe('Pane', () => {
le... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/config-spec.js | spec/config-spec.js | describe('Config', () => {
let savedSettings;
beforeEach(() => {
spyOn(console, 'warn');
atom.config.settingsLoaded = true;
savedSettings = [];
atom.config.saveCallback = function(settings) {
savedSettings.push(settings);
};
});
describe('.get(keyPath, {scope, sources, excludeSource... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/state-store-spec.js | spec/state-store-spec.js | /** @babel */
const StateStore = require('../src/state-store.js');
describe('StateStore', () => {
let databaseName = `test-database-${Date.now()}`;
let version = 1;
it('can save, load, and delete states', () => {
const store = new StateStore(databaseName, version);
return store
.save('key', { foo... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/text-utils-spec.js | spec/text-utils-spec.js | const textUtils = require('../src/text-utils');
describe('text utilities', () => {
describe('.hasPairedCharacter(string)', () =>
it('returns true when the string contains a surrogate pair, variation sequence, or combined character', () => {
expect(textUtils.hasPairedCharacter('abc')).toBe(false);
exp... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/command-installer-spec.js | spec/command-installer-spec.js | const path = require('path');
const fs = require('fs-plus');
const temp = require('temp').track();
const CommandInstaller = require('../src/command-installer');
describe('CommandInstaller on #darwin', () => {
let installer, resourcesPath, installationPath, atomBinPath, apmBinPath;
beforeEach(() => {
installat... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/async-spec-helpers.js | spec/async-spec-helpers.js | async function conditionPromise(
condition,
description = 'anonymous condition'
) {
const startTime = Date.now();
while (true) {
await timeoutPromise(100);
// if condition is sync
if (condition.constructor.name !== 'AsyncFunction' && condition()) {
return;
}
// if condition is async
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/typescript-spec.js | spec/typescript-spec.js | describe('TypeScript transpiler support', function() {
describe('when there is a .ts file', () =>
it('transpiles it using typescript', function() {
const transpiled = require('./fixtures/typescript/valid.ts');
expect(transpiled(3)).toBe(4);
}));
describe('when the .ts file is invalid', () =>
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/git-repository-provider-spec.js | spec/git-repository-provider-spec.js | const path = require('path');
const fs = require('fs-plus');
const temp = require('temp').track();
const { Directory } = require('pathwatcher');
const GitRepository = require('../src/git-repository');
const GitRepositoryProvider = require('../src/git-repository-provider');
describe('GitRepositoryProvider', () => {
l... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/spec-helper-platform.js | spec/spec-helper-platform.js | const path = require('path');
const fs = require('fs-plus');
// # Platform specific helpers
module.exports = {
// Public: Returns true if being run from within Windows
isWindows() {
return !!process.platform.match(/^win/);
},
// Public: Some files can not exist on Windows filesystems, so we have to
// s... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/module-cache-spec.js | spec/module-cache-spec.js | const path = require('path');
const Module = require('module');
const fs = require('fs-plus');
const temp = require('temp').track();
const ModuleCache = require('../src/module-cache');
describe('ModuleCache', function() {
beforeEach(() => spyOn(Module, '_findPath').andCallThrough());
afterEach(function() {
tr... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/tree-indenter-spec.js | spec/tree-indenter-spec.js | const fs = require('fs');
const path = require('path');
const TreeSitterGrammar = require('../src/tree-sitter-grammar');
const TreeSitterLanguageMode = require('../src/tree-sitter-language-mode');
const TreeIndenter = require('../src/tree-indenter');
const jsGrammarPath = require.resolve(
'language-javascript/gramma... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/path-watcher-spec.js | spec/path-watcher-spec.js | /** @babel */
import temp from 'temp';
import fs from 'fs-plus';
import path from 'path';
import { promisify } from 'util';
import { CompositeDisposable } from 'event-kit';
import { watchPath, stopAllWatchers } from '../src/path-watcher';
temp.track();
const writeFile = promisify(fs.writeFile);
const mkdir = promis... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/gutter-container-spec.js | spec/gutter-container-spec.js | const Gutter = require('../src/gutter');
const GutterContainer = require('../src/gutter-container');
describe('GutterContainer', () => {
let gutterContainer = null;
const fakeTextEditor = {
scheduleComponentUpdate() {}
};
beforeEach(() => {
gutterContainer = new GutterContainer(fakeTextEditor);
});
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/pane-axis-element-spec.js | spec/pane-axis-element-spec.js | const PaneAxis = require('../src/pane-axis');
const PaneContainer = require('../src/pane-container');
const Pane = require('../src/pane');
const buildPane = () =>
new Pane({
applicationDelegate: atom.applicationDelegate,
config: atom.config,
deserializerManager: atom.deserializers,
notificationManage... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/workspace-spec.js | spec/workspace-spec.js | const path = require('path');
const temp = require('temp').track();
const dedent = require('dedent');
const TextBuffer = require('text-buffer');
const TextEditor = require('../src/text-editor');
const Workspace = require('../src/workspace');
const Project = require('../src/project');
const platform = require('./spec-he... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/tree-sitter-language-mode-spec.js | spec/tree-sitter-language-mode-spec.js | /* eslint-disable no-template-curly-in-string */
const fs = require('fs');
const path = require('path');
const dedent = require('dedent');
const TextBuffer = require('text-buffer');
const { Point } = TextBuffer;
const TextEditor = require('../src/text-editor');
const TreeSitterGrammar = require('../src/tree-sitter-gra... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/notification-spec.js | spec/notification-spec.js | const Notification = require('../src/notification');
describe('Notification', () => {
it('throws an error when created with a non-string message', () => {
expect(() => new Notification('error', null)).toThrow();
expect(() => new Notification('error', 3)).toThrow();
expect(() => new Notification('error', ... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/workspace-center-spec.js | spec/workspace-center-spec.js | /** @babel */
const TextEditor = require('../src/text-editor');
describe('WorkspaceCenter', () => {
describe('.observeTextEditors()', () => {
it('invokes the observer with current and future text editors', () => {
const workspaceCenter = atom.workspace.getCenter();
const pane = workspaceCenter.getAc... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/panel-container-spec.js | spec/panel-container-spec.js | 'use strict';
const Panel = require('../src/panel');
const PanelContainer = require('../src/panel-container');
describe('PanelContainer', () => {
let container;
class TestPanelItem {}
beforeEach(() => {
container = new PanelContainer({ viewRegistry: atom.views });
});
describe('::addPanel(panel)', ()... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/pane-element-spec.js | spec/pane-element-spec.js | const PaneContainer = require('../src/pane-container');
describe('PaneElement', function() {
let [paneElement, container, containerElement, pane] = [];
beforeEach(function() {
spyOn(atom.applicationDelegate, 'open');
container = new PaneContainer({
location: 'center',
config: atom.config,
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/config-file-spec.js | spec/config-file-spec.js | const fs = require('fs-plus');
const path = require('path');
const temp = require('temp').track();
const dedent = require('dedent');
const ConfigFile = require('../src/config-file');
describe('ConfigFile', () => {
let filePath, configFile, subscription;
beforeEach(async () => {
jasmine.useRealClock();
con... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/clipboard-spec.js | spec/clipboard-spec.js | describe('Clipboard', () => {
describe('write(text, metadata) and read()', () => {
it('writes and reads text to/from the native clipboard', () => {
expect(atom.clipboard.read()).toBe('initial clipboard content');
atom.clipboard.write('next');
expect(atom.clipboard.read()).toBe('next');
});
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/uri-handler-registry-spec.js | spec/uri-handler-registry-spec.js | /** @babel */
import url from 'url';
import URIHandlerRegistry from '../src/uri-handler-registry';
describe('URIHandlerRegistry', () => {
let registry;
beforeEach(() => {
registry = new URIHandlerRegistry(5);
});
it('handles URIs on a per-host basis', async () => {
const testPackageSpy = jasmine.cr... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/native-watcher-registry-spec.js | spec/native-watcher-registry-spec.js | /** @babel */
import path from 'path';
import { Emitter } from 'event-kit';
import { NativeWatcherRegistry } from '../src/native-watcher-registry';
function findRootDirectory() {
let current = process.cwd();
while (true) {
let next = path.resolve(current, '..');
if (next === current) {
return next;... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/menu-sort-helpers-spec.js | spec/menu-sort-helpers-spec.js | const { sortMenuItems } = require('../src/menu-sort-helpers');
describe('contextMenu', () => {
describe('dedupes separators', () => {
it('preserves existing submenus', () => {
const items = [{ submenu: [] }];
expect(sortMenuItems(items)).toEqual(items);
});
});
describe('dedupes separators',... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/pane-container-element-spec.js | spec/pane-container-element-spec.js | const PaneContainer = require('../src/pane-container');
const PaneAxis = require('../src/pane-axis');
const params = {
location: 'center',
config: atom.config,
confirm: atom.confirm.bind(atom),
viewRegistry: atom.views,
applicationDelegate: atom.applicationDelegate
};
describe('PaneContainerElement', functi... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/project-spec.js | spec/project-spec.js | const temp = require('temp').track();
const TextBuffer = require('text-buffer');
const Project = require('../src/project');
const fs = require('fs-plus');
const path = require('path');
const { Directory } = require('pathwatcher');
const { stopAllWatchers } = require('../src/path-watcher');
const GitRepository = require... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/auto-update-manager-spec.js | spec/auto-update-manager-spec.js | const AutoUpdateManager = require('../src/auto-update-manager');
const { remote } = require('electron');
const electronAutoUpdater = remote.require('electron').autoUpdater;
describe('AutoUpdateManager (renderer)', () => {
if (process.platform !== 'darwin') return; // Tests are tied to electron autoUpdater, we use so... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/integration/smoke-spec.js | spec/integration/smoke-spec.js | const fs = require('fs-plus');
const path = require('path');
const season = require('season');
const temp = require('temp').track();
const runAtom = require('./helpers/start-atom');
describe('Smoke Test', () => {
// Fails on win32
if (process.platform !== 'darwin') {
return;
}
const atomHome = temp.mkdirS... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/integration/helpers/start-atom.js | spec/integration/helpers/start-atom.js | const path = require('path');
const http = require('http');
const temp = require('temp').track();
const { remote } = require('electron');
const { once } = require('underscore-plus');
const { spawn } = require('child_process');
const webdriverio = require('../../../script/node_modules/webdriverio');
const AtomPath = re... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/main-process/atom-application.test.js | spec/main-process/atom-application.test.js | /* globals assert */
const path = require('path');
const { EventEmitter } = require('events');
const temp = require('temp').track();
const fs = require('fs-plus');
const electron = require('electron');
const sandbox = require('sinon').createSandbox();
const AtomApplication = require('../../src/main-process/atom-appli... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/main-process/file-recovery-service.test.js | spec/main-process/file-recovery-service.test.js | const { dialog } = require('electron');
const FileRecoveryService = require('../../src/main-process/file-recovery-service');
const fs = require('fs-plus');
const fsreal = require('fs');
const EventEmitter = require('events').EventEmitter;
const { assert } = require('chai');
const sinon = require('sinon');
const { escap... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/main-process/parse-command-line.test.js | spec/main-process/parse-command-line.test.js | const { assert } = require('chai');
const parseCommandLine = require('../../src/main-process/parse-command-line');
describe('parseCommandLine', () => {
describe('when --uri-handler is not passed', () => {
it('parses arguments as normal', () => {
const args = parseCommandLine([
'-d',
'--safe... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/main-process/mocha-test-runner.js | spec/main-process/mocha-test-runner.js | const Mocha = require('mocha');
const fs = require('fs-plus');
const { assert } = require('chai');
module.exports = function(testPaths) {
global.assert = assert;
let reporterOptions = {
reporterEnabled: 'list'
};
if (process.env.TEST_JUNIT_XML_PATH) {
reporterOptions = {
reporterEnabled: 'list,... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/main-process/atom-window.test.js | spec/main-process/atom-window.test.js | /* globals assert */
const path = require('path');
const fs = require('fs-plus');
const url = require('url');
const { EventEmitter } = require('events');
const temp = require('temp').track();
const sandbox = require('sinon').createSandbox();
const dedent = require('dedent');
const AtomWindow = require('../../src/main... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/helpers/words.js | spec/helpers/words.js | /**
* List of single words from COMMON.txt
* http://www.gutenberg.org/ebooks/3201
* Public Domain
*/
module.exports = [
'a',
'aa',
'aalii',
'aardvark',
'aardwolf',
'aba',
'abaca',
'abacist',
'aback',
'abacus',
'abaft',
'abalone',
'abamp',
'abampere',
'abandon',
'abandoned',
'abase... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | true |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/helpers/random.js | spec/helpers/random.js | const WORDS = require('./words');
const { Point, Range } = require('text-buffer');
exports.getRandomBufferRange = function getRandomBufferRange(random, buffer) {
const endRow = random(buffer.getLineCount());
const startRow = random.intBetween(0, endRow);
const startColumn = random(buffer.lineForRow(startRow).len... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/script-with-deprecations.js | spec/fixtures/script-with-deprecations.js | require('fs').existsSync('hi');
process.stdout.write('hi');
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/sample.js | spec/fixtures/sample.js | var quicksort = function () {
var sort = function(items) {
if (items.length <= 1) return items;
var pivot = items.shift(), current, left = [], right = [];
while(items.length > 0) {
current = items.shift();
current < pivot ? left.push(current) : right.push(current);
}
return sort(left).... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/sample-with-many-folds.js | spec/fixtures/sample-with-many-folds.js | 1;
2;
function f3() {
return 4;
};
6;
7;
function f8() {
return 9;
};
11;
12;
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/script.js | spec/fixtures/script.js | process.stdout.write(process.argv[2]);
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/sample-with-comments.js | spec/fixtures/sample-with-comments.js | var quicksort = function () {
/*
this is a multiline comment
it is, I promise
*/
var sort = function(items) { // comment at the end of a foldable line
// This is a collection of
// single line comments.
// Wowza
if (items.length <= 1) return items;
var pivot = items.shift(), current, l... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/testdir/sample-theme-2/src/js/main.js | spec/fixtures/testdir/sample-theme-2/src/js/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/testdir/sample-theme-2/src/js/plugin/main.js | spec/fixtures/testdir/sample-theme-2/src/js/plugin/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/testdir/sample-theme-1/src/js/main.js | spec/fixtures/testdir/sample-theme-1/src/js/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/native-cache/file-4.js | spec/fixtures/native-cache/file-4.js | module.exports = function () { return "file-4" }
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/native-cache/file-1.js | spec/fixtures/native-cache/file-1.js | module.exports = function () { return 1; }
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/native-cache/file-3.js | spec/fixtures/native-cache/file-3.js | module.exports = function () { return 3; }
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/native-cache/file-2.js | spec/fixtures/native-cache/file-2.js | module.exports = function () { return 2; }
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/karma.conf.js | spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/karma.conf.js | // Karma configuration
// Generated on Sun Nov 22 2015 22:10:47 GMT+0800 (CST)
require('babel-core/register');
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '.',
// frameworks to use
// available frameworks: htt... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/dom.spec.js | spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/dom.spec.js | // test for CSS and style related | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/utilities.spec.js | spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/utilities.spec.js | // test for Utilities related | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/css.spec.js | spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/css.spec.js | // test for CSS related | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/query.spec.js | spec/fixtures/git/repo-with-submodules/You-Dont-Need-jQuery/test/query.spec.js | // tests for Query Selector related
import { expect } from 'chai';
import $ from 'jquery';
describe('query selector', () => {
describe('basic', () => {
beforeEach(() => {
document.body.innerHTML = `
<ul id='query-selector-test1' class='list'>
<li data-role='red' class='item-i red item'>I<... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/git/repo-with-submodules/jstips/resources/log.js | spec/fixtures/git/repo-with-submodules/jstips/resources/log.js | (() => {
console.log('Hello world');
})(); | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/function_call.js | spec/fixtures/indentation/function_call.js | foo({
sd,
sdf
},
4
);
foo( 2, {
sd,
sdf
},
4
);
foo( 2,
{
sd,
sdf
});
foo( 2, {
sd,
sdf
});
foo(2,
4);
foo({
symetric_opening_and_closing_scopes: 'indent me at 1'
});
foo(myWrapper(mysecondWrapper({
a: 1 // should be at 1
})));
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/switch.js | spec/fixtures/indentation/switch.js |
switch (e) {
case 5:
something();
more();
case 6:
somethingElse();
case 7:
default:
done();
}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/classes.js | spec/fixtures/indentation/classes.js | class MyClass extends OtherComponent {
state = {
test: 1
}
constructor() {
test();
}
otherfunction = (a, b = {
default: false
}) => {
more();
}
}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/objects_and_array.js | spec/fixtures/indentation/objects_and_array.js | var x = [
3,
4
];
const y = [
1
];
const j = [{
a: 1
}];
let h = {
a: [ 1,
2 ],
b: { j: [
{ l: 1 }]
},
c:
{ j: [
{ l: 1 }]
},
};
const a =
{
b: 1
};
const x = {
g: {
a: 1,
b: 2
},
h: {
c: 3
}
}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/jsx.jsx | spec/fixtures/indentation/jsx.jsx | /** JSX */
const jsx = (
<div
title='start'
>
good
<a>
link
</a>
<i>
sdfg
</i>
<div>
sdf
</div>
</div>
);
const two = (
<div>
<b>
test
</b>
<b>
test
</b>
</div>
);
const a = (
<img
src='/img.jpg'
/>
);
const b = (
<im... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/while.js | spec/fixtures/indentation/while.js | /** While loops */
while (condition)
inLoop();
while (condition)
inLoop();
after();
while (mycondition) {
sdfsdfg();
}
while (mycondition)
{
sdfsdfg();
}
while (mycond)
if (more)
doit;
after();
while (mycond) if (more)
doit;
after();
while (mycondition) {
sdfsdfg();
if (test) {
more()
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/expressions.js | spec/fixtures/indentation/expressions.js | /* multi-line expressions */
req
.shouldBeOne();
too.
more.
shouldBeOneToo;
const a =
long_expression;
b =
long;
b =
3 + 5;
b =
3
+ 5;
b =
3
+ 5
+ 7
+ 8
* 8
* 9
/ 17
* 8
/ 20
- 34
+ 3 *
9
- 8;
ifthis
&& thendo()
|| otherwise
&... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/indentation/if_then_else.js | spec/fixtures/indentation/if_then_else.js |
/** if-then-else loops */
if (true)
foo();
else
bar();
if (true) {
foo();
bar();
} else {
foo();
}
// https://github.com/atom/atom/issues/6691
if (true)
{
foo();
bar();
}
else
{
foo();
}
if (true) {
if (yes)
doit(); // 2
bar();
} else if (more()) {
foo(); // 1
}
if (true)
foo();
else
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-view-providers/index.js | spec/fixtures/packages/package-with-view-providers/index.js | 'use strict'
module.exports = {
activate () {},
theDeserializerMethod (state) {
return {state: state}
},
viewProviderMethod1 (model) {
if (model.worksWithViewProvider1) {
let element = document.createElement('div')
element.dataset['createdBy'] = 'view-provider-1'
return element
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-activation-commands-and-deserializers/index.js | spec/fixtures/packages/package-with-activation-commands-and-deserializers/index.js | module.exports = {
activateCallCount: 0,
activationCommandCallCount: 0,
initialize() {},
activate () {
this.activateCallCount++
atom.commands.add('atom-workspace', 'activation-command-2', () => this.activationCommandCallCount++)
},
deserializeMethod1 (state) {
return {
wasDeserializedBy... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-no-activate/index.js | spec/fixtures/packages/package-with-no-activate/index.js | module.exports = {}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-cached-incompatible-native-module/main.js | spec/fixtures/packages/package-with-cached-incompatible-native-module/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-directory-provider/index.js | spec/fixtures/packages/package-with-directory-provider/index.js | 'use strict'
class FakeRemoteDirectory {
constructor (uri) {
this.uri = uri
}
relativize (uri) {
return uri
}
getPath () {
return this.uri
}
isRoot () {
return true
}
getSubdirectory () {
return {
existsSync () {
return false
}
}
}
existsSync () {
... | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-deserializers/index.js | spec/fixtures/packages/package-with-deserializers/index.js | module.exports = {
initialize() {},
activate () {},
deserializeMethod1 (state) {
return {
wasDeserializedBy: 'deserializeMethod1',
state: state
}
},
deserializeMethod2 (state) {
return {
wasDeserializedBy: 'deserializeMethod2',
state: state
}
}
}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-incompatible-native-module/main.js | spec/fixtures/packages/package-with-incompatible-native-module/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/main.js | spec/fixtures/packages/package-with-incompatible-native-module/node_modules/native-module/main.js | throw new Error("this simulates a native module's failure to load")
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-url-main/index.js | spec/fixtures/packages/package-with-url-main/index.js | module.exports = function initialize() {
global.reachedUrlMain = true;
return Promise.resolve();
};
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-incompatible-native-module-loaded-conditionally/main.js | spec/fixtures/packages/package-with-incompatible-native-module-loaded-conditionally/main.js | const condition = false;
if (condition) {
const { native } = require("./node_modules/native-module");
native(condition);
}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-incompatible-native-module-loaded-conditionally/node_modules/native-module/main.js | spec/fixtures/packages/package-with-incompatible-native-module-loaded-conditionally/node_modules/native-module/main.js | exports.native = function loadNative(condition) {
if (condition) {
return require('../build/Release/native.node');
} else {
return null;
}
}
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-ignored-incompatible-native-module/main.js | spec/fixtures/packages/package-with-ignored-incompatible-native-module/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/compatible-native-module/main.js | spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/compatible-native-module/main.js | javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false | |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/native-module/main.js | spec/fixtures/packages/package-with-ignored-incompatible-native-module/node_modules/native-module/main.js | throw new Error("this simulates a native module's failure to load")
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
atom/atom | https://github.com/atom/atom/blob/1c3bd35ce238dc0491def9e1780d04748d8e18af/spec/fixtures/packages/package-with-tree-sitter-grammar/grammars/fake-parser.js | spec/fixtures/packages/package-with-tree-sitter-grammar/grammars/fake-parser.js | exports.isFakeTreeSitterParser = true
| javascript | MIT | 1c3bd35ce238dc0491def9e1780d04748d8e18af | 2026-01-04T14:56:51.056594Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.