How to test chrome extension in 2022 - javascript

I'm developing a chrome extension and I would like to know how to test it. I'm interested ideally in both unit and integration, but mostly integration tests. I've tried googling, but most of the solutions I found are either not good enough for the purpose or are using libraries which lost support. Also I'm new to javascript world, so if I would really appreciate a more detailed info. Thanks!

Related

How to prevent websites from knowing who is using my Chrome extension?

A few months ago I developed a Chrome extension, very much like the famous Reddit Enhancement Suite for a website very much like Reddit, for free. Userbase happy, rolling out little improvements here and there... And now out of the blue this website is programmatically giving those users a 1 day ban.
I've been googling methods to find out if a user has a specific extension and surprisingly for me it's not that hard (haven't tested those methods though but seem very plausible).
For example methods like this one.
I don't know what method they are using, but whatever it is, I should be able to see it somewhere in their code right? I'm reading through all I can see and there's nothing suspicious.
Where can I look? Tools? Ideas?
PS: No, there's no law that my extension violates, there are also no injured people nor cats.

How can I debug/step-through/watch my Node.js in Windows?

Sorry, maybe this belongs in programmers stack exchange, but I'm trying to get in to Node.js web development, and I really need to ability to step through my code in order to gain a deeper understanding of just what is happening in all the tutorials I'm using.
I've done some googling, but it looks like everything is written assuming you're in a *nix or OSX environment.
I've tried node-inspector, but I'm being greeted with errors whenever I try to run process._debugProcess() with the PID.
JetBrains WebStorm is relatively inexpensive IDE you can use with Node.js, which is quite feature rich considering the price.
Watch the demonstration video and you should get an idea to see if it's the kind of thing which could be helpful.
http://www.jetbrains.com/webstorm/
Alternatively you could use Eclipse and get this up and running.
https://github.com/joyent/node/wiki/Using-Eclipse-as-Node-Applications-Debugger

Chrome Dev Tools: Modifying / Extending (beyond the API)?

Is the only way to extend the Chrome dev tools via these APIs?
http://developer.chrome.com/extensions/devtools.html
http://developer.chrome.com/extensions/experimental.html
They seem pretty limited. I would want to be able to do things like filter things that have been logged / written to the console, search, pattern match, etc.
Even being able to do something like log everything but warnings (and errors) would be a simple addition I would like to do.
I can add other examples but I believe, if I'm correct, I will have to build Chrome from source?
I already run Canary and regular Chrome, I am wondering if it will run along these two?
I've read and tried to build Chrome on Mac but it didn't really work from the guide I followed, perhaps doing it on Ubuntu is easier? My goal is not to fix bugs in Chrome, just to extend it and keep it up to date with the Canary or a stable build.
Thank you.
PS: I do mostly javascript now but I used to work on systems so I am not afraid to write C++/C if I have to. However, I think the dev tools are mostly HTML/ JS themselves?

GUI Tool to test javascript

I am looking for GUI/Windows based tool to test my javascript code there instead of using firebug or other in-browser tool.
I want to play around with javascript language outside of the browser to learn more about it.
Has anyone come across such tool? I could not find one :(
Edit: I am looking for GUI/Windows based on which can be used even if I am not connected to internet and still play around with javascript.
I'm a big fan of jsFiddle.
jsBin is another option.
Microsoft Web Developer Express is free and has a great JavaScript editor and debugger.
If you're looking for something that you don't need to be connected to the internet for, why can't you just use your browser? I assume you've already got some kind of development platform now. Save to a local HTML file and view it on your local browser.
Do you not have some kind of a GUI development program like DreamWeaver or CODA or something like that? (I'm on a mac, so I'm not familiar with a lot of windows based programs).

Palm Pre and Visual Studio. Possible?

The development experience for the Palm Pre sucks, to say the least. At best you are working on JavaScript in Eclipse with the Aptana plugin. The intellisense you get is really, really dismal. You have to be looking at the documentation every 5 seconds.
I was thinking, Visual Studio really excels at JavaScript and intellisense. Has anyone succeeded at writing Palm Pre code in VS2008 with intellisense, which would require hooking in Palm's Mojo Library?
Is there a known way to hook in 3rd party non-source libraries to JavaScript in Vs2008?
I've been looking for alternatives to Eclipse, too, but so far it does not appear that anyone has done it. For myself it felt like too much work, so I just switched to working with several terminal windows open and a browser window to the documentation.
I'm a long time eclipse user but was disappointed in the eclipse environment for Pre - especially after using the Android SDK which hooks nicely into eclipse (then again the dev environment is Java there).
Have you tried Komodo? I switched over to it and the autocompletion is nice and the webos addon does a decent job. I don't have the professional version so I can't comment on the debugging capability which I'd love to have.
If you can tell VS08 you want to load the Mojo.js stuff, then it should work. I think you should be able to configure any custom tools you need for building etc. as well.
Personally I'd recommend you check out JetBrains' IntelliJ IDEA. They have really good JavaScript support and I've used it with some Pre-stuff as well.

Categories

Resources