jsfmt.spec.js.snap 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841
  1. // Jest Snapshot v1, https://goo.gl/fbAQLP
  2. exports[`bracket_0.js 1`] = `
  3. function a() {
  4. function b() {
  5. queryThenMutateDOM(
  6. () => {
  7. title = SomeThing.call(root, 'someLongStringThatPushesThisTextReallyFar')[0];
  8. }
  9. );
  10. }
  11. }
  12. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  13. function a() {
  14. function b() {
  15. queryThenMutateDOM(() => {
  16. title = SomeThing.call(
  17. root,
  18. "someLongStringThatPushesThisTextReallyFar"
  19. )[0];
  20. });
  21. }
  22. }
  23. `;
  24. exports[`break-last-call.js 1`] = `
  25. export default store => {
  26. return callApi(endpoint, schema).then(
  27. response => next(actionWith({
  28. response,
  29. type: successType
  30. })),
  31. error => next(actionWith({
  32. type: failureType,
  33. error: error.message || 'Something bad happened'
  34. }))
  35. )
  36. }
  37. it('should group messages with same created time', () => {
  38. expect(
  39. groupMessages(messages).toJS(),
  40. ).toEqual({
  41. '11/01/2017 13:36': [
  42. {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:36'},
  43. {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:36'},
  44. ],
  45. '09/01/2017 17:25': [
  46. {message: 'te', messageType: 'SMS', status: 'Unknown', created: '09/01/2017 17:25'},
  47. {message: 'te', messageType: 'Email', status: 'Unknown', created: '09/01/2017 17:25'},
  48. ],
  49. '11/01/2017 13:33': [
  50. {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:33'},
  51. {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:33'},
  52. ],
  53. '11/01/2017 13:37': [
  54. {message: 'test', messageType: 'SMS', status: 'Unknown', created: '11/01/2017 13:37'},
  55. {message: 'test', messageType: 'Email', status: 'Unknown', created: '11/01/2017 13:37'},
  56. ],
  57. });
  58. });
  59. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  60. export default store => {
  61. return callApi(endpoint, schema).then(
  62. response =>
  63. next(
  64. actionWith({
  65. response,
  66. type: successType
  67. })
  68. ),
  69. error =>
  70. next(
  71. actionWith({
  72. type: failureType,
  73. error: error.message || "Something bad happened"
  74. })
  75. )
  76. );
  77. };
  78. it("should group messages with same created time", () => {
  79. expect(groupMessages(messages).toJS()).toEqual({
  80. "11/01/2017 13:36": [
  81. {
  82. message: "test",
  83. messageType: "SMS",
  84. status: "Unknown",
  85. created: "11/01/2017 13:36"
  86. },
  87. {
  88. message: "test",
  89. messageType: "Email",
  90. status: "Unknown",
  91. created: "11/01/2017 13:36"
  92. }
  93. ],
  94. "09/01/2017 17:25": [
  95. {
  96. message: "te",
  97. messageType: "SMS",
  98. status: "Unknown",
  99. created: "09/01/2017 17:25"
  100. },
  101. {
  102. message: "te",
  103. messageType: "Email",
  104. status: "Unknown",
  105. created: "09/01/2017 17:25"
  106. }
  107. ],
  108. "11/01/2017 13:33": [
  109. {
  110. message: "test",
  111. messageType: "SMS",
  112. status: "Unknown",
  113. created: "11/01/2017 13:33"
  114. },
  115. {
  116. message: "test",
  117. messageType: "Email",
  118. status: "Unknown",
  119. created: "11/01/2017 13:33"
  120. }
  121. ],
  122. "11/01/2017 13:37": [
  123. {
  124. message: "test",
  125. messageType: "SMS",
  126. status: "Unknown",
  127. created: "11/01/2017 13:37"
  128. },
  129. {
  130. message: "test",
  131. messageType: "Email",
  132. status: "Unknown",
  133. created: "11/01/2017 13:37"
  134. }
  135. ]
  136. });
  137. });
  138. `;
  139. exports[`break-last-member.js 1`] = `
  140. SomeVeryLongUpperCaseConstant.someVeryLongCallExpression().some_very_long_member_expression
  141. weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode
  142. .childrenInAnArray[0];
  143. superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered;
  144. superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered[0];
  145. expect(
  146. findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0].style.paddingRight
  147. ).toBe('1000px');
  148. const { course, conflicts = [], index, scheduleId, studentId, something } = a.this.props;
  149. const { course, conflicts = [], index, scheduleId, studentId, something } = this.props;
  150. const {
  151. updated,
  152. author: { identifier: ownerId },
  153. location,
  154. category: categories,
  155. } = rawAd.entry;
  156. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  157. SomeVeryLongUpperCaseConstant.someVeryLongCallExpression()
  158. .some_very_long_member_expression;
  159. weNeedToReachTheEightyCharacterLimitXXXXXXXXXXXXXXXXX.someNode
  160. .childrenInAnArray[0];
  161. superSupersuperSupersuperSupersuperSupersuperSuperLong.exampleOfOrderOfGetterAndSetterReordered;
  162. superSupersuperSupersuperSupersuperSupersuperSuperLong
  163. .exampleOfOrderOfGetterAndSetterReordered[0];
  164. expect(
  165. findDOMNode(component.instance()).getElementsByClassName(styles.inner)[0]
  166. .style.paddingRight
  167. ).toBe("1000px");
  168. const {
  169. course,
  170. conflicts = [],
  171. index,
  172. scheduleId,
  173. studentId,
  174. something
  175. } = a.this.props;
  176. const {
  177. course,
  178. conflicts = [],
  179. index,
  180. scheduleId,
  181. studentId,
  182. something
  183. } = this.props;
  184. const {
  185. updated,
  186. author: { identifier: ownerId },
  187. location,
  188. category: categories
  189. } = rawAd.entry;
  190. `;
  191. exports[`break-multiple.js 1`] = `
  192. object.foo().bar().baz();
  193. foo().bar().baz();
  194. foo().bar.baz();
  195. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  196. object
  197. .foo()
  198. .bar()
  199. .baz();
  200. foo()
  201. .bar()
  202. .baz();
  203. foo().bar.baz();
  204. `;
  205. exports[`comment.js 1`] = `
  206. function f() {
  207. return observableFromSubscribeFunction()
  208. // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is
  209. // configurable.
  210. .debounceTime(debounceInterval);
  211. }
  212. _.a(a)
  213. /* very very very very very very very long such that it is longer than 80 columns */
  214. .a()
  215. _.a(
  216. a
  217. )/* very very very very very very very long such that it is longer than 80 columns */
  218. .a();
  219. _.a(
  220. a
  221. ) /* very very very very very very very long such that it is longer than 80 columns */.a();
  222. Something
  223. // $FlowFixMe(>=0.41.0)
  224. .getInstance(this.props.dao)
  225. .getters()
  226. // Warm-up first
  227. measure()
  228. .then(() => {
  229. SomethingLong();
  230. });
  231. measure() // Warm-up first
  232. .then(() => {
  233. SomethingLong();
  234. });
  235. const configModel = this.baseConfigurationService.getCache().consolidated // global/default values (do NOT modify)
  236. .merge(this.cachedWorkspaceConfig);
  237. this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions
  238. .then(() => null,
  239. error => {
  240. return options.donotNotifyError ? TPromise.wrapError(error) : this.onError(error, target, value);
  241. });
  242. ret = __DEV__ ?
  243. // $FlowFixMe: this type differs according to the env
  244. vm.runInContext(source, ctx)
  245. : a
  246. this.firebase.object(\`/shops/\${shopLocation.shop}\`)
  247. // keep distance info
  248. .first((shop: ShopQueryResult, index: number, source: Observable<ShopQueryResult>): any => {
  249. // add distance to result
  250. const s = shop;
  251. s.distance = shopLocation.distance;
  252. return s;
  253. });
  254. angular.module('AngularAppModule')
  255. // Hello, I am comment.
  256. .constant('API_URL', 'http://localhost:8080/api');
  257. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  258. function f() {
  259. return (
  260. observableFromSubscribeFunction()
  261. // Debounce manually rather than using editor.onDidStopChanging so that the debounce time is
  262. // configurable.
  263. .debounceTime(debounceInterval)
  264. );
  265. }
  266. _.a(a)
  267. /* very very very very very very very long such that it is longer than 80 columns */
  268. .a();
  269. _.a(
  270. a
  271. ) /* very very very very very very very long such that it is longer than 80 columns */
  272. .a();
  273. _.a(
  274. a
  275. ) /* very very very very very very very long such that it is longer than 80 columns */
  276. .a();
  277. Something
  278. // $FlowFixMe(>=0.41.0)
  279. .getInstance(this.props.dao)
  280. .getters();
  281. // Warm-up first
  282. measure().then(() => {
  283. SomethingLong();
  284. });
  285. measure() // Warm-up first
  286. .then(() => {
  287. SomethingLong();
  288. });
  289. const configModel = this.baseConfigurationService
  290. .getCache()
  291. .consolidated // global/default values (do NOT modify)
  292. .merge(this.cachedWorkspaceConfig);
  293. this.doWriteConfiguration(target, value, options) // queue up writes to prevent race conditions
  294. .then(
  295. () => null,
  296. error => {
  297. return options.donotNotifyError
  298. ? TPromise.wrapError(error)
  299. : this.onError(error, target, value);
  300. }
  301. );
  302. ret = __DEV__
  303. ? // $FlowFixMe: this type differs according to the env
  304. vm.runInContext(source, ctx)
  305. : a;
  306. this.firebase
  307. .object(\`/shops/\${shopLocation.shop}\`)
  308. // keep distance info
  309. .first(
  310. (
  311. shop: ShopQueryResult,
  312. index: number,
  313. source: Observable<ShopQueryResult>
  314. ): any => {
  315. // add distance to result
  316. const s = shop;
  317. s.distance = shopLocation.distance;
  318. return s;
  319. }
  320. );
  321. angular
  322. .module("AngularAppModule")
  323. // Hello, I am comment.
  324. .constant("API_URL", "http://localhost:8080/api");
  325. `;
  326. exports[`computed.js 1`] = `
  327. nock(/test/)
  328. .matchHeader('Accept', 'application/json')
  329. [httpMethodNock(method)]('/foo')
  330. .reply(200, {
  331. foo: 'bar',
  332. });
  333. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  334. nock(/test/)
  335. .matchHeader("Accept", "application/json")
  336. [httpMethodNock(method)]("/foo")
  337. .reply(200, {
  338. foo: "bar"
  339. });
  340. `;
  341. exports[`computed-merge.js 1`] = `
  342. [].forEach(key => {
  343. data[key]('foo')
  344. .then(() => console.log('bar'))
  345. .catch(() => console.log('baz'));
  346. });
  347. [].forEach(key => {
  348. data('foo')
  349. [key]('bar')
  350. .then(() => console.log('bar'))
  351. .catch(() => console.log('baz'));
  352. });
  353. window.Data[key]("foo")
  354. .then(() => a)
  355. .catch(() => b);
  356. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  357. [].forEach(key => {
  358. data[key]("foo")
  359. .then(() => console.log("bar"))
  360. .catch(() => console.log("baz"));
  361. });
  362. [].forEach(key => {
  363. data("foo")
  364. [key]("bar")
  365. .then(() => console.log("bar"))
  366. .catch(() => console.log("baz"));
  367. });
  368. window.Data[key]("foo")
  369. .then(() => a)
  370. .catch(() => b);
  371. `;
  372. exports[`conditional.js 1`] = `
  373. (a ? b : c).d();
  374. (a ? b : c).d().e();
  375. (a ? b : c).d().e().f();
  376. (valid
  377. ? helper.responseBody(this.currentUser)
  378. : helper.responseBody(this.defaultUser))
  379. .map();
  380. (valid
  381. ? helper.responseBody(this.currentUser)
  382. : helper.responseBody(this.defaultUser))
  383. .map().filter();
  384. (valid
  385. ? helper.responseBody(this.currentUser)
  386. : helper.responseBody(defaultUser))
  387. .map();
  388. object[valid
  389. ? helper.responseBody(this.currentUser)
  390. : helper.responseBody(defaultUser)]
  391. .map();
  392. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  393. (a ? b : c).d();
  394. (a ? b : c).d().e();
  395. (a ? b : c)
  396. .d()
  397. .e()
  398. .f();
  399. (valid
  400. ? helper.responseBody(this.currentUser)
  401. : helper.responseBody(this.defaultUser)
  402. ).map();
  403. (valid
  404. ? helper.responseBody(this.currentUser)
  405. : helper.responseBody(this.defaultUser)
  406. )
  407. .map()
  408. .filter();
  409. (valid
  410. ? helper.responseBody(this.currentUser)
  411. : helper.responseBody(defaultUser)
  412. ).map();
  413. object[
  414. valid
  415. ? helper.responseBody(this.currentUser)
  416. : helper.responseBody(defaultUser)
  417. ].map();
  418. `;
  419. exports[`d3.js 1`] = `
  420. d3.select('body')
  421. .append('circle')
  422. .at({ width: 30, fill: '#f0f' })
  423. .st({ fontWeight: 600 })
  424. d3.scaleLinear()
  425. .domain([1950, 1980])
  426. .range([0, width])
  427. not.d3.select('body')
  428. .append('circle')
  429. .at({ width: 30, fill: '#f0f' })
  430. .st({ fontWeight: 600 })
  431. not.d3.scaleLinear()
  432. .domain([1950, 1980])
  433. .range([0, width])
  434. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  435. d3.select("body")
  436. .append("circle")
  437. .at({ width: 30, fill: "#f0f" })
  438. .st({ fontWeight: 600 });
  439. d3.scaleLinear()
  440. .domain([1950, 1980])
  441. .range([0, width]);
  442. not.d3
  443. .select("body")
  444. .append("circle")
  445. .at({ width: 30, fill: "#f0f" })
  446. .st({ fontWeight: 600 });
  447. not.d3
  448. .scaleLinear()
  449. .domain([1950, 1980])
  450. .range([0, width]);
  451. `;
  452. exports[`first_long.js 1`] = `
  453. export default function theFunction(action$, store) {
  454. return action$.ofType(THE_ACTION).switchMap(action => Observable
  455. .webSocket({
  456. url: THE_URL,
  457. more: stuff(),
  458. evenMore: stuff({
  459. value1: true,
  460. value2: false,
  461. value3: false
  462. })
  463. })
  464. .filter(data => theFilter(data))
  465. .map(({ theType, ...data }) => theMap(theType, data))
  466. .retryWhen(errors => errors));
  467. }
  468. function f() {
  469. return this._getWorker(workerOptions)({
  470. filePath,
  471. hasteImplModulePath: this._options.hasteImplModulePath,
  472. }).then(
  473. metadata => {
  474. // \`1\` for truthy values instead of \`true\` to save cache space.
  475. fileMetadata[H.VISITED] = 1;
  476. const metadataId = metadata.id;
  477. const metadataModule = metadata.module;
  478. if (metadataId && metadataModule) {
  479. fileMetadata[H.ID] = metadataId;
  480. setModule(metadataId, metadataModule);
  481. }
  482. fileMetadata[H.DEPENDENCIES] = metadata.dependencies || [];
  483. }
  484. );
  485. }
  486. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  487. export default function theFunction(action$, store) {
  488. return action$.ofType(THE_ACTION).switchMap(action =>
  489. Observable.webSocket({
  490. url: THE_URL,
  491. more: stuff(),
  492. evenMore: stuff({
  493. value1: true,
  494. value2: false,
  495. value3: false
  496. })
  497. })
  498. .filter(data => theFilter(data))
  499. .map(({ theType, ...data }) => theMap(theType, data))
  500. .retryWhen(errors => errors)
  501. );
  502. }
  503. function f() {
  504. return this._getWorker(workerOptions)({
  505. filePath,
  506. hasteImplModulePath: this._options.hasteImplModulePath
  507. }).then(metadata => {
  508. // \`1\` for truthy values instead of \`true\` to save cache space.
  509. fileMetadata[H.VISITED] = 1;
  510. const metadataId = metadata.id;
  511. const metadataModule = metadata.module;
  512. if (metadataId && metadataModule) {
  513. fileMetadata[H.ID] = metadataId;
  514. setModule(metadataId, metadataModule);
  515. }
  516. fileMetadata[H.DEPENDENCIES] = metadata.dependencies || [];
  517. });
  518. }
  519. `;
  520. exports[`inline_merge.js 1`] = `
  521. Object.keys(
  522. availableLocales({
  523. test: true
  524. })
  525. )
  526. .forEach(locale => {
  527. // ...
  528. });
  529. this.layoutPartsToHide = this.utils.hashset(
  530. _.flatMap(this.visibilityHandlers, fn => fn())
  531. .concat(this.record.resolved_legacy_visrules)
  532. .filter(Boolean)
  533. );
  534. var jqxhr = $.ajax("example.php")
  535. .done(doneFn)
  536. .fail(failFn);
  537. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  538. Object.keys(
  539. availableLocales({
  540. test: true
  541. })
  542. ).forEach(locale => {
  543. // ...
  544. });
  545. this.layoutPartsToHide = this.utils.hashset(
  546. _.flatMap(this.visibilityHandlers, fn => fn())
  547. .concat(this.record.resolved_legacy_visrules)
  548. .filter(Boolean)
  549. );
  550. var jqxhr = $.ajax("example.php")
  551. .done(doneFn)
  552. .fail(failFn);
  553. `;
  554. exports[`logical.js 1`] = `
  555. const someLongVariableName = (idx(
  556. this.props,
  557. props => props.someLongPropertyName
  558. ) || []
  559. ).map(edge => edge.node);
  560. (veryLongVeryLongVeryLong || e).map(tickets =>
  561. TicketRecord.createFromSomeLongString());
  562. (veryLongVeryLongVeryLong || e).map(tickets =>
  563. TicketRecord.createFromSomeLongString()).filter(obj => !!obj);
  564. (veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets =>
  565. TicketRecord.createFromSomeLongString());
  566. (veryLongVeryLongVeryLong || anotherVeryLongVeryLongVeryLong || veryVeryVeryLongError).map(tickets =>
  567. TicketRecord.createFromSomeLongString()).filter(obj => !!obj);
  568. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  569. const someLongVariableName = (
  570. idx(this.props, props => props.someLongPropertyName) || []
  571. ).map(edge => edge.node);
  572. (veryLongVeryLongVeryLong || e).map(tickets =>
  573. TicketRecord.createFromSomeLongString()
  574. );
  575. (veryLongVeryLongVeryLong || e)
  576. .map(tickets => TicketRecord.createFromSomeLongString())
  577. .filter(obj => !!obj);
  578. (
  579. veryLongVeryLongVeryLong ||
  580. anotherVeryLongVeryLongVeryLong ||
  581. veryVeryVeryLongError
  582. ).map(tickets => TicketRecord.createFromSomeLongString());
  583. (
  584. veryLongVeryLongVeryLong ||
  585. anotherVeryLongVeryLongVeryLong ||
  586. veryVeryVeryLongError
  587. )
  588. .map(tickets => TicketRecord.createFromSomeLongString())
  589. .filter(obj => !!obj);
  590. `;
  591. exports[`multiple-members.js 1`] = `
  592. if (testConfig.ENABLE_ONLINE_TESTS === "true") {
  593. describe("POST /users/me/pet", function() {
  594. it("saves pet", function() {
  595. function assert(pet) {
  596. expect(pet).to.have.property("OwnerAddress").that.deep.equals({
  597. AddressLine1: "Alexanderstrasse",
  598. AddressLine2: "",
  599. PostalCode: "10999",
  600. Region: "Berlin",
  601. City: "Berlin",
  602. Country: "DE"
  603. });
  604. }
  605. });
  606. });
  607. }
  608. wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')().then(function() {
  609. doSomething();
  610. });
  611. wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument').then(function() {
  612. doSomething();
  613. });
  614. wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName', 'second argument that pushes this group past 80 characters')('argument').then(function() {
  615. doSomething();
  616. });
  617. wrapper.find('SomewhatLongNodeName').prop('longPropFunctionName')('argument', 'second argument that pushes this group past 80 characters').then(function() {
  618. doSomething();
  619. });
  620. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  621. if (testConfig.ENABLE_ONLINE_TESTS === "true") {
  622. describe("POST /users/me/pet", function() {
  623. it("saves pet", function() {
  624. function assert(pet) {
  625. expect(pet)
  626. .to.have.property("OwnerAddress")
  627. .that.deep.equals({
  628. AddressLine1: "Alexanderstrasse",
  629. AddressLine2: "",
  630. PostalCode: "10999",
  631. Region: "Berlin",
  632. City: "Berlin",
  633. Country: "DE"
  634. });
  635. }
  636. });
  637. });
  638. }
  639. wrapper
  640. .find("SomewhatLongNodeName")
  641. .prop("longPropFunctionName")()
  642. .then(function() {
  643. doSomething();
  644. });
  645. wrapper
  646. .find("SomewhatLongNodeName")
  647. .prop("longPropFunctionName")("argument")
  648. .then(function() {
  649. doSomething();
  650. });
  651. wrapper
  652. .find("SomewhatLongNodeName")
  653. .prop(
  654. "longPropFunctionName",
  655. "second argument that pushes this group past 80 characters"
  656. )("argument")
  657. .then(function() {
  658. doSomething();
  659. });
  660. wrapper
  661. .find("SomewhatLongNodeName")
  662. .prop("longPropFunctionName")(
  663. "argument",
  664. "second argument that pushes this group past 80 characters"
  665. )
  666. .then(function() {
  667. doSomething();
  668. });
  669. `;
  670. exports[`short-names.js 1`] = `
  671. const svgJsFiles = fs
  672. .readdirSync(svgDir)
  673. .filter(f => svgJsFileExtRegex.test(f))
  674. .map(f => path.join(svgDir, f));
  675. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  676. const svgJsFiles = fs
  677. .readdirSync(svgDir)
  678. .filter(f => svgJsFileExtRegex.test(f))
  679. .map(f => path.join(svgDir, f));
  680. `;
  681. exports[`square_0.js 1`] = `
  682. const version = someLongString
  683. .split('jest version =')
  684. .pop()
  685. .split(EOL)[0]
  686. .trim();
  687. const component = find('.org-lclp-edit-copy-url-banner__link')[0]
  688. .getAttribute('href')
  689. .indexOf(this.landingPageLink);
  690. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  691. const version = someLongString
  692. .split("jest version =")
  693. .pop()
  694. .split(EOL)[0]
  695. .trim();
  696. const component = find(".org-lclp-edit-copy-url-banner__link")[0]
  697. .getAttribute("href")
  698. .indexOf(this.landingPageLink);
  699. `;
  700. exports[`test.js 1`] = `
  701. method().then(x => x)
  702. ["abc"](x => x)
  703. [abc](x => x);
  704. ({}.a().b());
  705. ({}).a().b();
  706. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  707. method()
  708. .then(x => x)
  709. ["abc"](x => x)
  710. [abc](x => x);
  711. ({}.a().b());
  712. ({}.a().b());
  713. `;
  714. exports[`this.js 1`] = `
  715. const sel = this.connections
  716. .concat(this.activities.concat(this.operators))
  717. .filter(x => x.selected);
  718. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  719. const sel = this.connections
  720. .concat(this.activities.concat(this.operators))
  721. .filter(x => x.selected);
  722. `;