@thednp/shorty 2.0.2 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/shorty.cjs +1 -1
- package/dist/shorty.cjs.map +1 -1
- package/dist/shorty.d.ts +12 -11
- package/dist/shorty.js +1 -1
- package/dist/shorty.js.map +1 -1
- package/dist/shorty.mjs +14 -4
- package/dist/shorty.mjs.map +1 -1
- package/package.json +17 -15
- package/src/boolean/isApple.ts +1 -1
- package/src/boolean/isFirefox.ts +3 -1
- package/src/boolean/isMobile.ts +1 -1
- package/src/event/one.ts +1 -1
- package/src/get/getRectRelativeToOffsetParent.ts +1 -1
- package/src/index.ts +11 -0
- package/src/misc/createCustomEvent.ts +5 -5
- package/src/misc/createElementNS.ts +1 -1
- package/src/misc/emulateAnimationEnd.ts +3 -2
- package/src/misc/emulateTransitionEnd.ts +2 -2
- package/src/selectors/closest.ts +5 -2
- package/test/att.test.ts +43 -0
- package/test/boolean.test.ts +30 -0
- package/test/class.test.ts +26 -0
- package/test/event.test.ts +39 -0
- package/{cypress/test.html → test/fixtures/getExampleDom.ts} +17 -32
- package/test/fixtures/style.css +18 -0
- package/test/get.test.ts +150 -0
- package/{cypress/e2e/is.cy.ts → test/is.test.ts} +77 -74
- package/test/misc.test.ts +352 -0
- package/test/selectors.test.ts +90 -0
- package/tsconfig.json +6 -1
- package/vitest.config-ui.ts +21 -0
- package/vitest.config.ts +20 -0
- package/cypress/e2e/att.cy.ts +0 -46
- package/cypress/e2e/boolean.cy.ts +0 -44
- package/cypress/e2e/class.cy.ts +0 -28
- package/cypress/e2e/event.cy.ts +0 -51
- package/cypress/e2e/get.cy.ts +0 -168
- package/cypress/e2e/misc.cy.ts +0 -354
- package/cypress/e2e/selectors.cy.ts +0 -85
- package/cypress/plugins/esbuild-istanbul.ts +0 -50
- package/cypress/plugins/tsCompile.ts +0 -34
- package/cypress/support/commands.ts +0 -37
- package/cypress/support/e2e.ts +0 -21
- package/cypress/support/index.js +0 -22
- package/cypress.config.ts +0 -30
- /package/{cypress → test}/fixtures/custom-elem.js +0 -0
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/// <reference types="cypress" />
|
|
2
|
-
// ***********************************************
|
|
3
|
-
// This example commands.ts shows you how to
|
|
4
|
-
// create various custom commands and overwrite
|
|
5
|
-
// existing commands.
|
|
6
|
-
//
|
|
7
|
-
// For more comprehensive examples of custom
|
|
8
|
-
// commands please read more here:
|
|
9
|
-
// https://on.cypress.io/custom-commands
|
|
10
|
-
// ***********************************************
|
|
11
|
-
//
|
|
12
|
-
//
|
|
13
|
-
// -- This is a parent command --
|
|
14
|
-
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
// -- This is a child command --
|
|
18
|
-
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
19
|
-
//
|
|
20
|
-
//
|
|
21
|
-
// -- This is a dual command --
|
|
22
|
-
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
// -- This will overwrite an existing command --
|
|
26
|
-
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
27
|
-
//
|
|
28
|
-
// declare global {
|
|
29
|
-
// namespace Cypress {
|
|
30
|
-
// interface Chainable {
|
|
31
|
-
// login(email: string, password: string): Chainable<void>
|
|
32
|
-
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
33
|
-
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element>
|
|
34
|
-
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element>
|
|
35
|
-
// }
|
|
36
|
-
// }
|
|
37
|
-
// }
|
package/cypress/support/e2e.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
// ***********************************************************
|
|
2
|
-
// This example support/e2e.ts is processed and
|
|
3
|
-
// loaded automatically before your test files.
|
|
4
|
-
//
|
|
5
|
-
// This is a great place to put global configuration and
|
|
6
|
-
// behavior that modifies Cypress.
|
|
7
|
-
//
|
|
8
|
-
// You can change the location of this file or turn off
|
|
9
|
-
// automatically serving support files with the
|
|
10
|
-
// 'supportFile' configuration option.
|
|
11
|
-
//
|
|
12
|
-
// You can read more here:
|
|
13
|
-
// https://on.cypress.io/configuration
|
|
14
|
-
// ***********************************************************
|
|
15
|
-
|
|
16
|
-
// Import commands.js using ES2015 syntax:
|
|
17
|
-
import "./commands";
|
|
18
|
-
|
|
19
|
-
// Alternatively you can use CommonJS syntax:
|
|
20
|
-
// require('./commands')
|
|
21
|
-
import "@cypress/code-coverage/support";
|
package/cypress/support/index.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// ***********************************************************
|
|
2
|
-
// This example support/index.js is processed and
|
|
3
|
-
// loaded automatically before your test files.
|
|
4
|
-
//
|
|
5
|
-
// This is a great place to put global configuration and
|
|
6
|
-
// behavior that modifies Cypress.
|
|
7
|
-
//
|
|
8
|
-
// You can change the location of this file or turn off
|
|
9
|
-
// automatically serving support files with the
|
|
10
|
-
// 'supportFile' configuration option.
|
|
11
|
-
//
|
|
12
|
-
// You can read more here:
|
|
13
|
-
// https://on.cypress.io/configuration
|
|
14
|
-
// ***********************************************************
|
|
15
|
-
|
|
16
|
-
// Import commands.js using ES2015 syntax:
|
|
17
|
-
import './commands'
|
|
18
|
-
|
|
19
|
-
// Alternatively you can use CommonJS syntax:
|
|
20
|
-
// require('./commands')
|
|
21
|
-
|
|
22
|
-
import '@cypress/code-coverage/support'
|
package/cypress.config.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from 'cypress';
|
|
2
|
-
import createBundler from '@bahmutov/cypress-esbuild-preprocessor';
|
|
3
|
-
import createEsbuildIstanbulPlugin from './cypress/plugins/esbuild-istanbul';
|
|
4
|
-
import coverage from '@cypress/code-coverage/task';
|
|
5
|
-
|
|
6
|
-
async function setupNodeEvents(
|
|
7
|
-
on: Cypress.PluginEvents,
|
|
8
|
-
config: Cypress.PluginConfigOptions,
|
|
9
|
-
): Promise<Cypress.PluginConfigOptions> {
|
|
10
|
-
await coverage(on, config);
|
|
11
|
-
|
|
12
|
-
on(
|
|
13
|
-
'file:preprocessor',
|
|
14
|
-
createBundler({
|
|
15
|
-
plugins: [createEsbuildIstanbulPlugin()],
|
|
16
|
-
}),
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
// Make sure to return the config object as it might have been modified by the plugin.
|
|
20
|
-
return config;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export default defineConfig({
|
|
24
|
-
e2e: {
|
|
25
|
-
specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
|
|
26
|
-
supportFile: 'cypress/support/e2e.ts',
|
|
27
|
-
video: false,
|
|
28
|
-
setupNodeEvents,
|
|
29
|
-
},
|
|
30
|
-
});
|
|
File without changes
|