nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: zeit-ui/react
Pull request #139 (2020-04-27 02:02:44)

feat(icons): link icons through CSS variables
## PR Checklist

- [x] Fix linting errors
- [x] Label has been added


## Change information

Link icons through CSS variables: zeit-ui/react-icons#2



Patch:
diff --git a/components/styles/css-baseline/css-baseline.tsx b/components/styles/css-baseline/css-baseline.tsx
index 5c44a56..4f47588 100644
--- a/components/styles/css-baseline/css-baseline.tsx
+++ b/components/styles/css-baseline/css-baseline.tsx
@@ -19,6 +19,7 @@ const CSSBaseline: React.FC<React.PropsWithChildren<{}>> = React.memo(({
         
         html {
           font-size: 16px;
+          --zeit-icons-background: ${theme.palette.background};
         }
         
         body {


Test patch:
diff --git a/components/styles/__tests__/__snapshots__/baseline.test.tsx.snap b/components/styles/__tests__/__snapshots__/baseline.test.tsx.snap
index 7bb6c7b..b525e59 100644
--- a/components/styles/__tests__/__snapshots__/baseline.test.tsx.snap
+++ b/components/styles/__tests__/__snapshots__/baseline.test.tsx.snap
@@ -14,6 +14,7 @@ initialize {
         
         html {
           font-size: 16px;
+          --zeit-icons-background: #fff;
         }
         
         body {
@@ -306,6 +307,7 @@ initialize {
         
         html {
           font-size: 16px;
+          --zeit-icons-background: #000;
         }
         
         body {
Repository: zeit-ui/react
Pull request #204 (2020-05-13 10:46:51)

fix(tooltip): fix autowrap errors for elements wrapped by tooltip
## PR Checklist

- [x] Fix linting errors
- [x] Label has been added


## Change information





Patch:
diff --git a/components/tooltip/tooltip.tsx b/components/tooltip/tooltip.tsx
index 2e39cbf..9a23361 100644
--- a/components/tooltip/tooltip.tsx
+++ b/components/tooltip/tooltip.tsx
@@ -110,6 +110,7 @@ const Tooltip: React.FC<React.PropsWithChildren<TooltipProps>> = ({
       <style jsx>{`
         .tooltip {
           width: max-content;
+          display: inline-block;
         }
       `}</style>
     </div>


Test patch:
diff --git a/components/popover/__tests__/__snapshots__/index.test.tsx.snap b/components/popover/__tests__/__snapshots__/index.test.tsx.snap
index 998aa07..b673ec6 100644
--- a/components/popover/__tests__/__snapshots__/index.test.tsx.snap
+++ b/components/popover/__tests__/__snapshots__/index.test.tsx.snap
@@ -9,6 +9,7 @@ exports[`Popover should render react-node 1`] = `
       </style><style>
         .tooltip {
           width: max-content;
+          display: inline-block;
         }
       </style></div>"
 `;
@@ -22,6 +23,7 @@ exports[`Popover should work with different placement 1`] = `
       </style><style>
         .tooltip {
           width: max-content;
+          display: inline-block;
         }
       </style></div>"
 `;
Repository: zeit-ui/react
Pull request #308 (2020-07-02 11:05:11)

fix(tabs): add role="button" to tab for a11y
## Checklist

- [x] Fix linting errors
- [x] Label has been added

## Change information

Add `role="button"` to tabs, vercel style has the `role` attribute. This also [make vimium recognize the tab](https://github.com/philc/vimium/blob/bdf654aebe6f570f427c5f7bc9592cad86e642b5/content_scripts/link_hints.js#L912).

![image](https://user-images.githubusercontent.com/15090582/86351306-a35b3000-bc96-11ea-954e-460003e8a19c.png)

By the way, what does the "Label has been added" checkbox mean?



Patch:
diff --git a/components/tabs/tabs.tsx b/components/tabs/tabs.tsx
index 8254ccd..f00f053 100644
--- a/components/tabs/tabs.tsx
+++ b/components/tabs/tabs.tsx
@@ -76,6 +76,7 @@ const Tabs: React.FC<React.PropsWithChildren<TabsProps>> = ({
               className={`tab ${selfValue === item.value ? 'active' : ''} ${
                 item.disabled ? 'disabled' : ''
               }`}
+              role="button"
               key={item.value + index}
               onClick={() => clickHandler(item)}>
               {item.label}


Test patch:
diff --git a/components/tabs/__tests__/__snapshots__/index.test.tsx.snap b/components/tabs/__tests__/__snapshots__/index.test.tsx.snap
index ce89867..87e6aae 100644
--- a/components/tabs/__tests__/__snapshots__/index.test.tsx.snap
+++ b/components/tabs/__tests__/__snapshots__/index.test.tsx.snap
@@ -1,7 +1,7 @@
 // Jest Snapshot v1, https://goo.gl/fbAQLP
 
 exports[`Tabs should render correctly 1`] = `
-"<div class=\\"tabs \\"><header class=\\"\\"><div class=\\"tab  \\">label1</div><div class=\\"tab  \\">label2</div></header><div class=\\"content\\"></div><style>
+"<div class=\\"tabs \\"><header class=\\"\\"><div class=\\"tab  \\" role=\\"button\\">label1</div><div class=\\"tab  \\" role=\\"button\\">label2</div></header><div class=\\"content\\"></div><style>
           .tabs {
             width: initial;
           }
@@ -76,7 +76,7 @@ exports[`Tabs should render correctly 1`] = `
 `;
 
 exports[`Tabs should work correctly with different styles 1`] = `
-"<div class=\\"tabs \\"><header class=\\"hide-divider\\"><div class=\\"tab  \\">label1</div></header><div class=\\"content\\"></div><style>
+"<div class=\\"tabs \\"><header class=\\"hide-divider\\"><div class=\\"tab  \\" role=\\"button\\">label1</div></header><div class=\\"content\\"></div><style>
           .tabs {
             width: initial;
           }
Repository: zeit/swr
Pull request #196 (2019-12-11 12:47:26)

Fix config as second parameter in use-swr
If user wants to call `useSWR` hook with config object as second parameter, provided config object is interpreted as fetcher function and hook won't work.

This PR fixes that bug and adds test.




Patch:
diff --git a/src/use-swr.ts b/src/use-swr.ts
index 39a64cb..0a373a3 100644
--- a/src/use-swr.ts
+++ b/src/use-swr.ts
@@ -156,7 +156,7 @@ function useSWR<Data = any, Error = any>(
   if (args.length >= 1) {
     _key = args[0]
   }
-  if (args.length >= 2) {
+  if (args.length > 2) {
     fn = args[1]
     config = args[2]
   } else {


Test patch:
diff --git a/test/use-swr.test.tsx b/test/use-swr.test.tsx
index 6c45d5d..587da83 100644
--- a/test/use-swr.test.tsx
+++ b/test/use-swr.test.tsx
@@ -260,6 +260,27 @@ describe('useSWR', () => {
       `"hello, SWR"`
     )
   })
+
+  it('should set config as second parameter', async () => {
+    const fetcher = jest.fn(() => 'SWR')
+
+    function Page() {
+      const { data } = useSWR('config-as-second-param', {
+        fetcher
+      })
+
+      return <div>hello, {data}</div>
+    }
+
+    const { container } = render(<Page />)
+
+    expect(container.firstChild.textContent).toMatchInlineSnapshot(`"hello, "`)
+    expect(fetcher).toBeCalled()
+    await waitForDomChange({ container }) // mount
+    expect(container.firstChild.textContent).toMatchInlineSnapshot(
+      `"hello, SWR"`
+    )
+  })
 })
 
 describe('useSWR - refresh', () => {
Repository: stealjs/steal
Pull request #1352 (2018-03-07 18:25:05)

Update code-frame so that it will run in Node
This updates your code-frame dependency so that the errors pass through
correctly in Node.

<!--
Thanks for your contribution!

Please make sure your pull request (PR) includes documentation and/or test updates.

In this PR description, please include a link to the issue(s) your PR addresses. If you include the issue number(s) in your commit(s), GitHub can automatically close the original issue(s): https://help.github.com/articles/closing-issues-via-commit-messages/

If applicable, please include a screenshot or gif to demonstrate your change. This makes it easier for reviewers to verify that it works for them. You can use LICEcap to make a gif: http://www.cockos.com/licecap/
-->



Patch:
diff --git a/ext/babel-code-frame.js b/ext/babel-code-frame.js
index 2b29db39..401f3f70 100644
--- a/ext/babel-code-frame.js
+++ b/ext/babel-code-frame.js
@@ -120,7 +120,12 @@
 	});
 })(
 	{ "steal-code-frame-standalone": "BabelCodeFrame" },
-	typeof self == "object" && self.Object == Object ? self : window,
+	typeof self == "object" && self.Object == Object
+		? self
+		: typeof process === "object" &&
+			Object.prototype.toString.call(process) === "[object process]"
+			? global
+			: window,
 	function(__$source__, __$global__) {
 		// jshint ignore:line
 		eval("(function() { " + __$source__ + " \n }).call(__$global__);");
@@ -956,4 +961,4 @@ define('steal-code-frame-standalone', [
 	global._define = global.define;
 	global.define = global.define.orig;
 }
-)(typeof self == "object" && self.Object == Object ? self : window);
\ No newline at end of file
+)(typeof self == "object" && self.Object == Object ? self : (typeof process === "object" && Object.prototype.toString.call(process) === "[object process]") ? global : window);
\ No newline at end of file


Test patch:
diff --git a/test/node_test.js b/test/node_test.js
index e0a1e7c3..8318dcdb 100644
--- a/test/node_test.js
+++ b/test/node_test.js
@@ -62,19 +62,16 @@ describe("plugins", function(){
 describe("Modules that don't exist", function(){
 	it("should reject", function(done){
 		var steal = makeSteal({
-			config: __dirname + "/../package.json!npm",
-			main: "@empty"
+			config: __dirname + "/file_missing/package.json!npm"
 		});
 
 		steal.startup().then(function(){
-			steal.import("some/fake/module")
-			.then(function(){
-				assert.ok(false, "Promise resolved when it should have rejected");
-			}, function(err){
-				assert.ok(err instanceof Error, "Got an error");
-			})
-			.then(done, done);
-		});
+			assert.ok(false, "Promise resolved when it should have rejected");
+		}, function(err){
+			assert.ok(err instanceof Error, "Got an error");
+			assert.ok(/AwesomeButton/.test(err.message), "Code is inlined");
+		})
+		.then(done, done);
 	});
 });
Repository: moment/luxon
Pull request #538 (2019-07-08 19:51:20)

 Added DATETIME_MED_WITH_WEEKDAY preset for formatting toLocaleString
With reference to this [issue](https://github.com/moment/luxon/issues/283)

- Added DATETIME_MED_WITH_WEEKDAY preset in src/datetime.js

- Added support for env without Intl in src/impl/english.js

- Added DATETIME_MED_WITH_WEEKDAY preset format in src/impl/formats.js

- Added a test case in test/datetime/degrade.test.js

icambron: Looks good, thanks! This will go into the next release.

Patch:
diff --git a/src/datetime.js b/src/datetime.js
index c5fce729..b753d748 100644
--- a/src/datetime.js
+++ b/src/datetime.js
@@ -2011,6 +2011,14 @@ export default class DateTime {
     return Formats.DATETIME_MED_WITH_SECONDS;
   }
 
+  /**
+   * {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
+   * @type {Object}
+   */
+  static get DATETIME_MED_WITH_WEEKDAY() {
+    return Formats.DATETIME_MED_WITH_WEEKDAY;
+  }
+
   /**
    * {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
    * @type {Object}
diff --git a/src/impl/english.js b/src/impl/english.js
index 9ace8e45..84321df4 100644
--- a/src/impl/english.js
+++ b/src/impl/english.js
@@ -211,6 +211,8 @@ export function formatString(knownFormat) {
       return "M/d/yyyy, h:mm:ss a";
     case stringify(Formats.DATETIME_MED_WITH_SECONDS):
       return "LLL d, yyyy, h:mm:ss a";
+    case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):
+      return "EEE, d LLL yyyy, h:mm a";
     case stringify(Formats.DATETIME_FULL_WITH_SECONDS):
       return "LLLL d, yyyy, h:mm:ss a";
     case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):
diff --git a/src/impl/formats.js b/src/impl/formats.js
index 7bc7b0cd..1b17bbfc 100644
--- a/src/impl/formats.js
+++ b/src/impl/formats.js
@@ -135,6 +135,15 @@ export const DATETIME_MED_WITH_SECONDS = {
   second: d2
 };
 
+export const DATETIME_MED_WITH_WEEKDAY = {
+  year: n,
+  month: s,
+  day: n,
+  weekday: s,
+  hour: n,
+  minute: d2
+};
+
 export const DATETIME_FULL = {
   year: n,
   month: l,


Test patch:
diff --git a/test/datetime/degrade.test.js b/test/datetime/degrade.test.js
index 9104dc33..d03f6d85 100644
--- a/test/datetime/degrade.test.js
+++ b/test/datetime/degrade.test.js
@@ -45,6 +45,7 @@ Helpers.withoutIntl("DateTime#toLocaleString supports known configurations", ()
   expected.set(DateTime.DATETIME_HUGE, "Wednesday, August 6, 2014, 9:15 AM");
   expected.set(DateTime.DATETIME_SHORT_WITH_SECONDS, "8/6/2014, 9:15:36 AM");
   expected.set(DateTime.DATETIME_MED_WITH_SECONDS, "Aug 6, 2014, 9:15:36 AM");
+  expected.set(DateTime.DATETIME_MED_WITH_WEEKDAY, "Wed, 6 Aug 2014, 9:15 AM");
   expected.set(DateTime.DATETIME_FULL_WITH_SECONDS, "August 6, 2014, 9:15:36 AM");
   expected.set(DateTime.DATETIME_HUGE_WITH_SECONDS, "Wednesday, August 6, 2014, 9:15:36 AM");
Repository: moment/luxon
Pull request #633 (2019-12-23 19:13:51)

Throw error when specifying 24-hour format with meridiem
Closes https://github.com/moment/luxon/issues/617

I'm getting two failing tests but I think they are unrelated.

<details>
  <summary>Failing tests</summary>
  
![Selection_252](https://user-images.githubusercontent.com/13897419/71375936-d907b980-258d-11ea-81ca-716d715e7fc5.png)

</details>

I've tested it out in the browser with the line of code from that issue and it throws as it should

qualitymanifest: Hmm, would it be better to put it [here](https://github.com/moment/luxon/blob/5bf5f2b04a0d16417c35e2c1f71348d559a4de2b/src/datetime.js#L802) with `if (fmt.includes("a") && fmt.includes("H")) { ...` ?
icambron: No, I think it's better where you put it in the pull. Going to merge this.

Thanks!

Patch:
diff --git a/src/impl/tokenParser.js b/src/impl/tokenParser.js
index 45562f17..88560ae2 100644
--- a/src/impl/tokenParser.js
+++ b/src/impl/tokenParser.js
@@ -4,6 +4,7 @@ import FixedOffsetZone from "../zones/fixedOffsetZone.js";
 import IANAZone from "../zones/IANAZone.js";
 import DateTime from "../datetime.js";
 import { digitRegex, parseDigits } from "./digits.js";
+import { ConflictingSpecificationError } from "../errors.js";
 
 const MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support";
 
@@ -400,7 +401,11 @@ export function explainFromTokens(locale, input, format) {
       regex = RegExp(regexString, "i"),
       [rawMatches, matches] = match(input, regex, handlers),
       [result, zone] = matches ? dateTimeFromMatches(matches) : [null, null];
-
+    if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
+      throw new ConflictingSpecificationError(
+        "Can't include meridiem when specifying 24-hour format"
+      );
+    }
     return { input, tokens, regex, rawMatches, matches, result, zone };
   }
 }


Test patch:
diff --git a/test/datetime/tokenParse.test.js b/test/datetime/tokenParse.test.js
index 05143424..984bb4b0 100644
--- a/test/datetime/tokenParse.test.js
+++ b/test/datetime/tokenParse.test.js
@@ -1,5 +1,6 @@
 /* global test expect */
 import { DateTime } from "../../src/luxon";
+import { ConflictingSpecificationError } from "../../src/errors";
 
 //------
 // .fromFormat
@@ -61,6 +62,10 @@ test("DateTime.fromFormat() parses meridiems", () => {
   expect(i.hour).toBe(12);
 });
 
+test("DateTime.fromFormat() throws if you specify meridiem with 24-hour time", () => {
+  expect(() => DateTime.fromFormat("930PM", "Hmma")).toThrow(ConflictingSpecificationError);
+});
+
 test("DateTime.fromFormat() parses variable-digit years", () => {
   expect(DateTime.fromFormat("", "y").isValid).toBe(false);
   expect(DateTime.fromFormat("2", "y").year).toBe(2);
Repository: moment/luxon
Pull request #871 (2021-02-13 16:12:38)

Fix padding of negative years in IsoDate
Fixes [868](https://github.com/moment/luxon/issues/868)


Patch:
diff --git a/src/impl/diff.js b/src/impl/diff.js
index 57246dc9..1b8afb36 100644
--- a/src/impl/diff.js
+++ b/src/impl/diff.js
@@ -13,6 +13,7 @@ function dayDiff(earlier, later) {
 function highOrderDiffs(cursor, later, units) {
   const differs = [
     ["years", (a, b) => b.year - a.year],
+    ["quarters", (a, b) => b.quarter - a.quarter],
     ["months", (a, b) => b.month - a.month + (b.year - a.year) * 12],
     [
       "weeks",
diff --git a/src/impl/util.js b/src/impl/util.js
index b345c694..59f6f860 100644
--- a/src/impl/util.js
+++ b/src/impl/util.js
@@ -99,11 +99,17 @@ export function floorMod(x, n) {
 }
 
 export function padStart(input, n = 2) {
-  if (input.toString().length < n) {
-    return ("0".repeat(n) + input).slice(-n);
+  const minus = input < 0 ? "-" : "";
+  const target = minus ? input * -1 : input;
+  let result;
+
+  if (target.toString().length < n) {
+    result = ("0".repeat(n) + target).slice(-n);
   } else {
-    return input.toString();
+    result = target.toString();
   }
+
+  return `${minus}${result}`;
 }
 
 export function parseInteger(string) {


Test patch:
diff --git a/test/datetime/diff.test.js b/test/datetime/diff.test.js
index e4e29f3c..cb439b6f 100644
--- a/test/datetime/diff.test.js
+++ b/test/datetime/diff.test.js
@@ -25,6 +25,14 @@ test("DateTime#diff makes simple diffs", () => {
     years: 1
   });
 
+  expect(diffObjs({ year: 2016, month: 4 }, { year: 2016, month: 1 }, "quarters")).toEqual({
+    quarters: 1
+  });
+
+  expect(diffObjs({ year: 2017, month: 10 }, { year: 2017, month: 4 }, "quarters")).toEqual({
+    quarters: 2
+  });
+
   expect(
     diffObjs({ year: 2016, month: 6, day: 28 }, { year: 2016, month: 5, day: 28 }, "months")
   ).toEqual({ months: 1 });
diff --git a/test/datetime/format.test.js b/test/datetime/format.test.js
index a4dee80f..461ecaa4 100644
--- a/test/datetime/format.test.js
+++ b/test/datetime/format.test.js
@@ -91,6 +91,15 @@ test("DateTime#toISODate() returns ISO 8601 date in format [±YYYYY]", () => {
   );
 });
 
+test("DateTime#toISODate() correctly pads negative years", () => {
+  expect(DateTime.fromObject({ year: -1, month: 1, day: 1, zone: "utc" }).toISODate()).toBe(
+    "-0001-01-01"
+  );
+  expect(DateTime.fromObject({ year: -10, month: 1, day: 1, zone: "utc" }).toISODate()).toBe(
+    "-0010-01-01"
+  );
+});
+
 //------
 // #toISOWeekDate()
 //------
Repository: moment/luxon
Pull request #886 (2021-02-27 16:46:12)

#829: Made English Info lists immutable
Fix for [#829](https://github.com/moment/luxon/issues/829).

Bug only appears when the English lists are used, hence setting the default locale in the test.


Patch:
diff --git a/src/impl/english.js b/src/impl/english.js
index 633f5943..0ae2069a 100644
--- a/src/impl/english.js
+++ b/src/impl/english.js
@@ -44,11 +44,11 @@ export const monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "
 export function months(length) {
   switch (length) {
     case "narrow":
-      return monthsNarrow;
+      return [...monthsNarrow];
     case "short":
-      return monthsShort;
+      return [...monthsShort];
     case "long":
-      return monthsLong;
+      return [...monthsLong];
     case "numeric":
       return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
     case "2-digit":
@@ -75,11 +75,11 @@ export const weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"];
 export function weekdays(length) {
   switch (length) {
     case "narrow":
-      return weekdaysNarrow;
+      return [...weekdaysNarrow];
     case "short":
-      return weekdaysShort;
+      return [...weekdaysShort];
     case "long":
-      return weekdaysLong;
+      return [...weekdaysLong];
     case "numeric":
       return ["1", "2", "3", "4", "5", "6", "7"];
     default:
@@ -98,11 +98,11 @@ export const erasNarrow = ["B", "A"];
 export function eras(length) {
   switch (length) {
     case "narrow":
-      return erasNarrow;
+      return [...erasNarrow];
     case "short":
-      return erasShort;
+      return [...erasShort];
     case "long":
-      return erasLong;
+      return [...erasLong];
     default:
       return null;
   }


Test patch:
diff --git a/test/info/listers.test.js b/test/info/listers.test.js
index c58419fe..2b0b834e 100644
--- a/test/info/listers.test.js
+++ b/test/info/listers.test.js
@@ -2,6 +2,9 @@
 
 import { Info } from "../../src/luxon";
 
+import Helpers from "../helpers";
+const withDefaultLocale = Helpers.withDefaultLocale;
+
 //------
 // .months()
 //------
@@ -374,3 +377,33 @@ test("Info.eras lists both eras", () => {
   expect(Info.eras("short", { locale: "fr" })).toEqual(["av. J.-C.", "ap. J.-C."]);
   expect(Info.eras("long", { locale: "fr" })).toEqual(["avant Jésus-Christ", "après Jésus-Christ"]);
 });
+
+//------
+// general
+//------
+test("Info English lists are not mutable", () => {
+  withDefaultLocale("en-US", () => {
+    const cachingMethods = [
+      ["weekdays", "short"],
+      ["weekdays", "long"],
+      ["weekdays", "narrow"],
+      ["weekdays", "numeric"],
+      ["months", "short"],
+      ["months", "long"],
+      ["months", "narrow"],
+      ["months", "numeric"],
+      ["months", "2-digit"],
+      ["eras", "narrow"],
+      ["eras", "short"],
+      ["eras", "long"]
+    ];
+
+    for (const [method, arg] of cachingMethods) {
+      const fn = Info[method];
+      const original = [...fn(arg)];
+      fn(arg).pop();
+      const expected = fn(arg);
+      expect(expected).toEqual(original);
+    }
+  });
+});
Repository: moment/luxon
Pull request #928 (2021-05-01 05:18:12)

#927: Return null when calling intersection() on abutting Intervals
See #927 for the justification.

### Tested
Updated test to intended behavior without updating code and it failed (as intended):
```
 FAIL  test/interval/many.test.js
  ● Interval#intersection returns null for adjacent intervals

    expect(received).toBeNull()

    Received: {"e": "2017-05-25T08:00:00.000-04:00", "invalid": null, "isLuxonInterval": true, "s": "2017-05-25T08:00:00.000-04:00"}

      113 |
      114 | test("Interval#intersection returns null for adjacent intervals", () => {
    > 115 |   expect(todayFrom(5, 8).intersection(todayFrom(8, 10))).toBeNull();
          |                                                          ^
      116 | });
      117 |
      118 | test("Interval#intersection returns invalid for invalid intervals", () => {

      at Object.<anonymous> (test/interval/many.test.js:115:58)
```

Updating interval.js caused the test to begin passing and did not cause any other failures:
```
 PASS  test/interval/many.test.js
```

icambron: Looks good, thanks! Will go into the next release

Patch:
diff --git a/src/interval.js b/src/interval.js
index e8a419bc..71273fd1 100644
--- a/src/interval.js
+++ b/src/interval.js
@@ -429,7 +429,7 @@ export default class Interval {
     const s = this.s > other.s ? this.s : other.s,
       e = this.e < other.e ? this.e : other.e;
 
-    if (s > e) {
+    if (s >= e) {
       return null;
     } else {
       return Interval.fromDateTimes(s, e);


Test patch:
diff --git a/test/interval/many.test.js b/test/interval/many.test.js
index 002bd97b..69d3aec4 100644
--- a/test/interval/many.test.js
+++ b/test/interval/many.test.js
@@ -111,12 +111,8 @@ test("Interval#intersection returns the intersection for overlapping intervals",
   ).toBeTruthy();
 });
 
-test("Interval#intersection returns empty for adjacent intervals", () => {
-  expect(
-    todayFrom(5, 8)
-      .intersection(todayFrom(8, 10))
-      .isEmpty()
-  ).toBeTruthy();
+test("Interval#intersection returns null for adjacent intervals", () => {
+  expect(todayFrom(5, 8).intersection(todayFrom(8, 10))).toBeNull();
 });
 
 test("Interval#intersection returns invalid for invalid intervals", () => {