Question: i extract som html information of a website using file\_get\_contents and i want ti print by echo

how i can do 

```
$page = file_get_contents('*******');
preg_match("/<span class=\"a-text-strike\".*span>/", $page, $precio_antes);
preg_match("/<span id=\"priceblock_ourprice\".*span>/", $page, $precio_ahora);
preg_match("/<td class=\"a-span12 a-color-price a-size-base\".*td>/", $page, $precio_descuento);

echo "Antes: ".$precio_antes. "Ahora: " .$precio_ahora." (-" .$precio_descuento. "%)";

```

Answer: 
Extending on [Merlin's answer](https://stackoverflow.com/a/38422707/1069189), here is how I've implemented publishing jest test results AND code coverage to TFS2015 vNext builds (I am using create-react-app boilerplate):

First install required packages on the Server you are running your Agent on:

npm install -g jest-json-to-tap

npm install -g tap-xunit

1. configure jest to output json, by changing in package.json the "test" task to:
"test": "react-scripts test --env=jsdom --json",
2. configure jest options in package.json:
"jest": { "coverageReporters": ["cobertura"] }
3. created a vNext build (TFS2015v4) with the following tasks:

a. "npm" task, command=run, arguments=test -- --coverage | jest-json-to-tap | tap-xunit > TEST-result.xml

b. "publish test results" task, format=JUnit

c. "public code coverage results" task, code coverage tool=Cobertura, Summary file=$(Build.Repository.LocalPath)\coverage\cobertura-coverage.xml

4. make sure your build's "Variables" include setting the environment variable "CI"="true"

NOTES:
- test results will not include times nor assemblies - something to extend for the future...

Voila'! Running this build will correctly publish the test results and code coverage stats, as well as report artifacts.
If you are running with XAML build, this link will help you: [Javascript Unit Tests on Team Foundation Service with Chutzpah](https://blogs.msdn.microsoft.com/visualstudioalm/2012/07/09/javascript-unit-tests-on-team-foundation-service-with-chutzpah/)

If you are running with vNext build, please try the detail steps mentioned with Jasmine.JS test(also a kind of JavaScript test ) in [this blog](https://www.microsoft.com/en-gb/developers/articles/week04aug15/nunit-and-jasmine-js-unit-tests-in-tfs-vso-vnext-build/).