Deployed the page to Github Pages.

This commit is contained in:
Batuhan Berk Başoğlu 2024-11-03 21:30:09 -05:00
parent 1d79754e93
commit 2c89899458
Signed by: batuhan-basoglu
SSH key fingerprint: SHA256:kEsnuHX+qbwhxSAXPUQ4ox535wFHu/hIRaa53FzxRpo
62797 changed files with 6551425 additions and 15279 deletions

View file

@ -0,0 +1,9 @@
Examples
========
To launch one of this examples:
* Clone this repository
* Install dependencies
* Go to your wanted example directory
* Follow the README.md instructions

View file

@ -0,0 +1,29 @@
Use jasmine-spec-reporter with Node
===================================
The `jasmine-spec-reporter` can be used to enhance your
[jasmine node](https://github.com/jasmine/jasmine-npm) tests execution report.
## Configuration
Create a `spec/helpers/reporter.js` file with the following content:
```javascript
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
jasmine.getEnv().clearReporters(); // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter({ // add jasmine-spec-reporter
spec: {
displayPending: true
}
}));
```
Then run your tests!
## Example
This directory is setup as a working example, so you can inspect the `package.json`,
the `spec` directory, and you can see it all work by issuing the following commands:
npm install
npm test

View file

@ -0,0 +1,14 @@
{
"name": "node-example",
"version": "1.0.0",
"description": "a node example",
"scripts": {
"test": "jasmine"
},
"author": "Bastien Caudan",
"license": "Apache-2.0",
"dependencies": {
"jasmine": "file:../../node_modules/jasmine",
"jasmine-spec-reporter": "file:../../"
}
}

View file

@ -0,0 +1,11 @@
const SpecReporter = require('jasmine-spec-reporter').SpecReporter;
jasmine.getEnv().clearReporters(); // remove default reporter logs
jasmine.getEnv().addReporter(new SpecReporter({ // add jasmine-spec-reporter
spec: {
displayPending: true,
},
summary: {
displayDuration: false,
}
}));

View file

@ -0,0 +1,56 @@
describe('first suite', () => {
it('should be ok', () => {
expect(true).toBe(true);
});
it('should be pending', () => {
pending('will work soon');
expect(true).toBe(true);
});
it('should failed', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
});
describe('second suite', () => {
xit('should be pending', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
describe('first child suite', () => {
describe('first grandchild suite', () => {
it('should failed', () => {
expect(true).toBe(false);
expect(true).toBe(false);
expect(true).toBe(true);
});
it('should failed', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
});
describe('second grandchild suite', () => {
it('should failed', () => {
expect(true).toBe(false);
});
it('should be ok', () => {
expect(true).toBe(true);
});
});
});
});

View file

@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}

View file

@ -0,0 +1,41 @@
Use jasmine-spec-reporter with Protractor
=========================================
The `jasmine-spec-reporter` can be used to enhance your [Protractor](https://github.com/angular/protractor) tests execution report.
## Protractor configuration
In your Protractor configuration file:
```javascript
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
// your config here ...
onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true
}
}));
}
}
```
## Remove protractor dot reporter
In your protractor configuration file, add the print function in the `jasmineNodeOpts` section:
```javascript
jasmineNodeOpts: {
...
print: function() {}
}
```
## Example
You can find an example in this directory:
```bash
npm install
npm test
```

View file

@ -0,0 +1,18 @@
{
"name": "protractor-example",
"version": "1.0.0",
"description": "a protractor example",
"scripts": {
"postinstall": "webdriver-manager update --gecko false --versions.chrome=83.0.4103.39",
"test": "protractor protractor.conf.js"
},
"author": "Bastien Caudan",
"license": "Apache-2.0",
"dependencies": {
"jasmine-spec-reporter": "file:../../"
},
"devDependencies": {
"protractor": "^5.4.2",
"webdriver-manager": "^12.1.5"
}
}

View file

@ -0,0 +1,32 @@
let SpecReporter = require('jasmine-spec-reporter').SpecReporter;
exports.config = {
framework: 'jasmine2',
jasmineNodeOpts: {
showColors: true,
silent: true,
defaultTimeoutInterval: 360000,
print: function () {
}
},
specs: [
'./spec/protractor-spec.js'
],
capabilities: {
browserName: 'chrome',
'chromeOptions': {
args: ['--test-type']
}
},
logLevel: 'WARN',
onPrepare: function () {
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: true
},
summary: {
displayDuration: false
}
}));
}
};

View file

@ -0,0 +1,11 @@
describe('angularjs homepage', () => {
it('should greet the named user', () => {
browser.get('http://www.angularjs.org');
element(by.model('yourName')).sendKeys('Julie');
const greeting = element(by.binding('yourName'));
expect(greeting.getText()).toEqual('Hello Julie!');
})
});

View file

@ -0,0 +1,30 @@
Use jasmine-spec-reporter with TypeScript
=========================================
## Configuration
```typescript
import {DisplayProcessor, SpecReporter, StacktraceOption} from "jasmine-spec-reporter";
import SuiteInfo = jasmine.SuiteInfo;
class CustomProcessor extends DisplayProcessor {
public displayJasmineStarted(info: SuiteInfo, log: string): string {
return `TypeScript ${log}`;
}
}
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.NONE
},
customProcessors: [CustomProcessor],
}));
```
## Example
You can find an example in this directory:
npm install
npm test

View file

@ -0,0 +1,18 @@
{
"name": "typescript-example",
"version": "1.0.0",
"description": "a typescript example",
"scripts": {
"tsc": "node node_modules/typescript/bin/tsc",
"pretest": "tsc",
"test": "jasmine"
},
"author": "Bastien Caudan",
"license": "Apache-2.0",
"dependencies": {
"@types/jasmine": "file:../../node_modules/@types/jasmine",
"jasmine": "file:../../node_modules/jasmine",
"jasmine-spec-reporter": "file:../../",
"typescript": "file:../../node_modules/typescript"
}
}

View file

@ -0,0 +1,16 @@
import {DisplayProcessor, SpecReporter, StacktraceOption} from "jasmine-spec-reporter";
import SuiteInfo = jasmine.SuiteInfo;
class CustomProcessor extends DisplayProcessor {
public displayJasmineStarted(info: SuiteInfo, log: string): string {
return `TypeScript ${log}`;
}
}
jasmine.getEnv().clearReporters();
jasmine.getEnv().addReporter(new SpecReporter({
spec: {
displayStacktrace: StacktraceOption.NONE
},
customProcessors: [CustomProcessor],
}));

View file

@ -0,0 +1,5 @@
describe("first suite", () => {
it("should be ok", () => {
expect(true).toBe(true);
});
});

View file

@ -0,0 +1,11 @@
{
"spec_dir": "spec",
"spec_files": [
"**/*[sS]pec.js"
],
"helpers": [
"helpers/**/*.js"
],
"stopSpecOnExpectationFailure": false,
"random": false
}