mirror of
https://github.com/tiennm99/github-readme-stats.git
synced 2026-09-04 06:19:52 +00:00
Feature/grs 1955 change commonjs imports (#1995)
* GRS-1955: Using ES6 import/export in src files * GRS-1955: Using ES6 import/export in test files * GRS-1955: Using ES6 import/export in themes index.js * GRS-1955: Readding blank line at end of top-languages-card.js * feat: fix test es6 import errors This commit makes sure jest is set-up to support es6. It also fixes several test errors and sorts the imports. * test: update test node version This commit makes sure node 16 is used in the github actions. * refactor: run prettier Co-authored-by: rickstaa <rick.staa@outlook.com>
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
require("@testing-library/jest-dom");
|
||||
const cssToObject = require("@uppercod/css-to-object").cssToObject;
|
||||
const renderStatsCard = require("../src/cards/stats-card");
|
||||
|
||||
const {
|
||||
import {
|
||||
getByTestId,
|
||||
queryByTestId,
|
||||
queryAllByTestId,
|
||||
} = require("@testing-library/dom");
|
||||
const themes = require("../themes");
|
||||
queryByTestId,
|
||||
} from "@testing-library/dom";
|
||||
import { cssToObject } from "@uppercod/css-to-object";
|
||||
import renderStatsCard from "../src/cards/stats-card";
|
||||
// adds special assertions like toHaveTextContent
|
||||
import "@testing-library/jest-dom";
|
||||
|
||||
import { themes } from "../themes";
|
||||
|
||||
describe("Test renderStatsCard", () => {
|
||||
const stats = {
|
||||
|
||||
Reference in New Issue
Block a user