forked from crabbly/Print.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import Browser from '../../src/js/browser' | ||
|
||
describe('Browser', () => { | ||
it('has a function named isFirefox that returns a boolean value', () => { | ||
expect(typeof Browser.isFirefox).toBe('function') | ||
expect(typeof Browser.isFirefox()).toBe('boolean') | ||
}) | ||
|
||
it('has a function named isIE that returns a boolean value', () => { | ||
expect(typeof Browser.isIE).toBe('function') | ||
expect(typeof Browser.isIE()).toBe('boolean') | ||
}) | ||
|
||
it('has a function named isEdge that returns a boolean value', () => { | ||
expect(typeof Browser.isEdge).toBe('function') | ||
expect(typeof Browser.isEdge()).toBe('boolean') | ||
}) | ||
|
||
it('has a function named isChrome that returns a boolean value', () => { | ||
expect(typeof Browser.isChrome).toBe('function') | ||
expect(typeof Browser.isChrome()).toBe('boolean') | ||
}) | ||
|
||
it('has a function named isSafari that returns a boolean value', () => { | ||
expect(typeof Browser.isSafari).toBe('function') | ||
expect(typeof Browser.isSafari()).toBe('boolean') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { addWrapper, capitalizePrint } from '../../src/js/functions' | ||
|
||
describe('addWrapper()', () => { | ||
it('add a div wrapper to a raw html', () => { | ||
const params = { | ||
font: 'TimesNewRoman', | ||
font_size: '12px' | ||
} | ||
expect(addWrapper('<span>Test</span>', params)).toBe('<div style="font-family:' + params.font + ' !important; font-size: ' + params.font_size + ' !important; width:100%;"><span>Test</span></div>') | ||
}) | ||
}) | ||
|
||
describe('capitalizePrint()', () => { | ||
it('should capitalize the first letter of a string', () => { | ||
expect(capitalizePrint('test')).toBe('Test') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Html from '../../src/js/html' | ||
|
||
describe('Html', () => { | ||
it('has a method named print', () => { | ||
expect(typeof Html.print).toBe('function') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Image from '../../src/js/image' | ||
|
||
describe('Image', () => { | ||
it('has a method named print', () => { | ||
expect(typeof Image.print).toBe('function') | ||
}) | ||
}) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Json from '../../src/js/json' | ||
|
||
describe('Json', () => { | ||
it('has a method named print', () => { | ||
expect(typeof Json.print).toBe('function') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Modal from '../../src/js/modal' | ||
|
||
describe('Modal', () => { | ||
it('has a method named show', () => { | ||
expect(typeof Modal.show).toBe('function') | ||
}) | ||
|
||
it('has a method named close', () => { | ||
expect(typeof Modal.close).toBe('function') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Pdf from '../../src/js/pdf' | ||
|
||
describe('Pdf', () => { | ||
it('has a method named print', () => { | ||
expect(typeof Pdf.print).toBe('function') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Print from '../../src/js/print' | ||
|
||
describe('Print', () => { | ||
it('has a method named send', () => { | ||
expect(typeof Print.send).toBe('function') | ||
}) | ||
}) |